Posted on: 04/16/03 10:09am
By: Anonymous (Anonymous)
I asked this question not too long back but my wording was off.
I am looking for a block which will display stories from only certain topics, or a single topic. Ideally I would like to be able to set up multiple blocks and have these all represent recent stories for that specific topic or topics. Does this exist or can it be done fairly easily? I know little to nothing about PHP but if somebody gives me a pointer I will do my very best.
Topic Specific Recent Stories
Posted on: 04/16/03 01:17pm
By: vinny
Yes it can be done faily easily by creating a php-block. You'd have to write some code (a function) in system/lib-custom.php.
I don't know of anyone who has done this. It might be a little difficult if you have no programming experience.
-Vinny
Topic Specific Recent Stories
Posted on: 04/16/03 02:25pm
By: Anonymous (Anonymous)
Is there another block you can reccomend I can look at or hack? Starting this project from scratch is not a reality for me.. I could possibly hack something up to produce the results I am looking for if given good starting blocks.
Thanks..
Topic Specific Recent Stories
Posted on: 04/16/03 03:18pm
By: rawdata
I'll put something together for you. Should have it later today.
Topic Specific Recent Stories
Posted on: 04/16/03 05:33pm
By: Anonymous (Anonymous)
Rawdata. I love you.. THANKS! This is a HUGE HELP!
Topic Specific Recent Stories
Posted on: 04/16/03 08:21pm
By: rawdata
I uploaded the file to this site. If/when it's approved, it'll be available for download. Please test it out, and let me know if you find any bugs.
My server has been going up and down all day long. So, I've only been able to do limited testing. I think everything works but may have missed something.
Topic Specific Recent Stories
Posted on: 04/17/03 08:44am
By: Anonymous (Anonymous)
I await with baited breath! Thanks RD!
Topic Specific Recent Stories
Posted on: 04/17/03 08:59am
By: Anonymous (Anonymous)
Just downloaded it, worked like a champ! One thing and I am not sure if this is possible. I have multiple topics I want to roll up in to one listing instead of breaking them out by topic. An exampled would be I want the header D to contain topics A, B and C as opposed to a separate header for each. You see, my topics are more like sub topics and I want to roll them up and show let's say the last 10 from a group of 5 or 6 topics. Other then that this is a very useful block, I am really surprised somebody else hasn't requested something like this in the past. GL is awesome but it pushes good information off the front page so quickly on an active site!
Thanks!
Topic Specific Recent Stories
Posted on: 04/17/03 03:09pm
By: rawdata
Done. New Version 1.1 is in the submission queue. Keep an eye out for it.
Topic Specific Recent Stories
Posted on: 04/17/03 04:14pm
By: Anonymous (Anonymous)
This is one of the most useful blocks to date in my opinion! Rolling up categories in to a single list is tre' cool. I assume if I want multiple blocks with different categories I should just copy and rename the function with the different settings?
Thanks for putting this together, it's going to make my life Sooooo much easier.
Topic Specific Recent Stories
Posted on: 04/17/03 05:46pm
By: rawdata
GL doesn't allow us to pass parameters in php block functions from the control panel. So, you would have to duplicate the function phpblock_StoriesByTopic and rename it. Actually, GL's Older Stories Block is similiar to what you ended up wanting. Had I known this initally, I would have just hacked that one up instead. Oh well, this will end up being more flexible. My next version will include configuration settings to add comment totals, dates, and a more link which will spawn off into a new page to display more. I won't be able to work on it again until next week.
Topic Specific Recent Stories
Posted on: 04/17/03 06:11pm
By: Anonymous (Anonymous)
Actually, I am using combinations of both the merged and broken out blocks. I have merged together 3 sets of topics then with the remaining topics kept them broken up. I will post a link here when it's fully configured. Thanks again, this is an extremley useful piece of code.
Topic Specific Recent Stories
Posted on: 02/12/05 08:25pm
By: Anonymous (Kiwi)
where can i download this , its exactly what i need
Topic Specific Recent Stories
Posted on: 02/13/05 08:22pm
By: r_f_o_t
[QUOTE BY= Kiwi] where can i download this , its exactly what i need[/QUOTE]
A quick search here for "Stories By Topic" brings up
this download link.[*1]
HTH,
Chuck