Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
How would you go around this?
We have built a site for the client, and it has some basic functionality, you can check it out at http://bebostation.com/ – it is a Bebo skins repository. Now we want to do a version 2 – add some functionality since the site has gained a user base, so we want to add comments, improve usability, etc. Concerning this – I have two questions.
1) At the moment users submit skins via an email form – since the only way to make a bebo skin is to host it on bebo.com, users are only passing on the URIs to the skins, along with their info and skin description (optional). Now, none of that is stored in TXPs database, it is simply sent to the owner’s email inbox – he reviews it and decides if he’ll add it to the site. Is there a way so that people can add skins and all that information to TXP via a frontend form on the site itself, therefore creating articles and populating (custom) fields as the owner does when he’s adding a new article? Also those kind of articles should not go live until approved. If it is possible – how are the authors treated? This brings us to my next question.
2) Right now the site has a “hall of fame” feature that is simply a list of the most active contributors – it is just a box with five names in it and their avatars. We would like to have a page, so when a name from that hall of fame is clicked – it would take the user to see all of the skins that user has created as a listing. Is this in any way possible?
Thanks in advance guys, cheers.
Offline
Re: How would you go around this?
1) check out manfre’s mem_moderation and associated plug-ins. They get you a long way, if not all the way there.
2) If you store the name of the author in a custom_field, you should be able to use article_custom to restrict the list of output articles to those matching a customfieldname. You can style the actual entries how you like with a form.
TXP Builders – finely-crafted code, design and txp
Offline
Re: How would you go around this?
Thanks for the tips jakob. I have been trying out mem plugins, but they don’t seem to work. :(
It says it has added the article, but in fact it doesn’t. Nothing’s there for moderation. Also I wonder if this could be somehow used along with the mem_self_register, so every skin author is really an author in TXP. Any ideas?
EDIT:
Also you are saying that I can create a “filter” with article custom to display only articles that have “xyz” in the custom_1 for instance, right? Wow, that would be awesome, but I wonder how could you link to a page (what would the URL be) that lists the articles that have “James” in the custom_1?
Last edited by draganbabic (2007-11-24 16:11:51)
Offline
Re: How would you go around this?
2 draganbabic:
Use txp tag article_custom like this:
<txp:article_custom you_custom_field_name="red" />
P.S. Sometimes it’s necessary to use <txp:article />
instead of <txp:article_custom />
(because of pagination). In this ocasion I use keywords <txp:article keywords="lalala" />
– this will output articles wich have lalala
set in keywords area :)
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: How would you go around this?
OK, thanks for clearing that up the_ghost.
What I am trying to achieve is so when you have an article listing, there is a link that says that article’s author (although it is not really a TXP author – it is a name we put in in a custom field), after slisking on that link – you get a page with a list of articles with that name in the custom field custom_1. Ugh, I hope you understand this…
Offline
Re: How would you go around this?
I guess you want to create article listing from articles, wich have set custom_field named “author” set to some value?
Providing help in hacking ATM! Come to courses and don’t forget to bring us notebook and hammer! What for notebook? What a kind of hacker you are without notebok?
Offline
Re: How would you go around this?
yeah, people submit Bebo.com skins info via email (because they have to be hosted on Bebo.com) and we input the skin author’s name in a custom field, now we would like to be able to give each skin author her page so to speak with a listing of the skins she has created.
Offline
Re: How would you go around this?
Well, quite simple, if using gps-function. In example.
A list of all authors:
In page template:
<txp:article_custom limit="9999" form="authorlist" sort="custom_1" />
In form named authorlist
<txp:if_different>
<a href="<txp:site_url />/user/?user=<txp:custom_field name="madeby" />"><txp:custom_field name="madeby" /></a>
</txp:if_different>
To output the author’s page:
<txp:php> if(gps('user')) {echo '<p>This is '.gps('user').' userpage.</p>';} </txp:php>
<txp:asy_wondertag><txp:article_custom limit="9999" form="authorpage" madeby="<txp:php>echo gps('user');</txp:php>" /></txp:asy_wondertag>
And in form named authorpage something that you will want to show the skin-articles or what’ever:
<txp:permlink><txp:title /></txp:permlink>
Link to the authorpage would look something like this:
http://www.bebo.com/?user=username
PS. Remember that you cannot name custom field to author, because there is attribute named author – they would conflict each other. The code ain’t tested and it written on fly. Ain’t sure if asy_wondertag will parse txp:php corretly (was issue in past) – if not you could write that article_custom with plain php.
Cheers!
Last edited by Gocom (2007-11-24 18:26:50)
Offline
Re: How would you go around this?
re: mem_moderation etc. it may be that the extra database tables for the plug-in have not been set up correctly. Check the problem mentioned in this thread, though Manfre did say he’d fixed it since.
TXP Builders – finely-crafted code, design and txp
Offline
Re: How would you go around this?
I have finally implemented this. Thank you so much again guys. At times like these I feel like I haven’t even scratched the surface of Textpattern when I see what is possible with a little custom scripting that I am in no way capable of.
There is one small point though – the bit that’s using asy_wondertag is spitting out the first user as blank (because there are most articles in the DB that don’t have that field populated at all), is there a way around that? Thanks.
PS ^ This is in reference to Gocom’s code.
Last edited by draganbabic (2007-12-11 18:02:30)
Offline
Re: How would you go around this?
jakob wrote:
re: mem_moderation etc. it may be that the extra database tables for the plug-in have not been set up correctly. Check the problem mentioned in this thread, though Manfre did say he’d fixed it since.
I can confirm this has been fixed in the latest version of Michael Manfre’s plugins, which are being implemented on one of my sites.
draganbabic, what you need on your site will be very easy to achieve I think with mem_ plugins. I believe Michael will be releasing the newer version after some more testing, although I can’t say what he plans. What I can say is that the new versions are much better and with a lot more features for user-submitted content.
Offline
Re: How would you go around this?
Thanks for the info jstubbs, I’ll redownload them and give them another try. Can’t wait for the new versions, really excited!
Offline