Version: 1.00, by maximux1
Developer Last Online: Jun 2012
Version: 3.0.1
Rating:
Released: 06-16-2004
Last Update: Never
Installs: 30
No support by the author.
v3Article/CMPS Module - Last 10 Articles
This CMPS module uses the excellent v3Article system developed by John Warwick. The module displays the 10 most recent articles submitted, in DESC order, (Last article submitted is first in list).
This module also includes the author of the article with a link to his pubilc profile and how many views the article has had.
You can vie the module in action on the right hand side of http://www.marijuana.com - the module is titled "The Magazine".
You'll need to upload the php file to your modules directory and create two new templates named "adv_portal_articles" & "adv_portal_articlesbits". Add the contents of the respective text files to the new templates and save. Next, create the new module using the drop down menu selecting "cmps-articles.php". In the "templates used" field enter the following templates.
adv_portal_articles,
adv_portal_articlesbits
Dont forget to update your index pages(s) to show the new module.
Special thanks to wcbryant, who's help has shed new light on vB development for me. Im very grateful for your code additions and help.
Maximux1
Marijuana.Com
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
That's slick max, on my site I think it will compliment the featured block nicely.
--edit--
On another note, I did the exact same thing in mine, then ended up removing it. You can comment out and/or delete the global.php require once, I believe. And if you replace $forumurl with $vboptions[bburl]/ in the code, then folks don't have to edit the php file at all and that can be commented out or removed too.
I'm seeing if I can edit the template now to see if it can have alternating cell bgcolors as with recent posts.
Great addition. Now if I can just figure out why mine breaks if there's no featured article...
--edit--
Got the cell alternating bgcolor working, this module is running on http://www.buckeyeplanet.com now. Thanks again Max, great addition! If you (Max) want to see my modifications, just PM me with your email and I'll shoot it over to you.
That's slick max, on my site I think it will compliment the featured block nicely.
--edit--
On another note, I did the exact same thing in mine, then ended up removing it. You can comment out and/or delete the global.php require once, I believe. And if you replace $forumurl with $vboptions[bburl]/ in the code, then folks don't have to edit the php file at all and that can be commented out or removed too.
I'm seeing if I can edit the template now to see if it can have alternating cell bgcolors as with recent posts.
Great addition. Now if I can just figure out why mine breaks if there's no featured article...
--edit--
Got the cell alternating bgcolor working, this module is running on http://www.buckeyeplanet.com now. Thanks again Max, great addition! If you (Max) want to see my modifications, just PM me with your email and I'll shoot it over to you.
thanks bro -
I tried your suggestions and didnt have much luck. Had to require global.php or I got a Fatal: Call to a member function on a non-object. Requiring global.php made it go away.
I dont believe the variable $vboptions[bburl] is in scope yet, so $forumurl is required as far as I can tell. My links did not render correctly when $forumurl was replaced with $vboptions[bburl].
looks like you would still have to edit the php file to setup the chdir() function to get global.php, or include the full path to global.php.
I'd be very interested to see the code be rewritten to not need module configuration. Would really simplify things.
Max
P.S. Im still trying to figure out how to make it so I dont have a featured article
I tried your suggestions and didnt have much luck. Had to require global.php or I got a Fatal: Call to a member function on a non-object. Requiring global.php made it go away.
I dont believe the variable $vboptions[bburl] is in scope yet, so $forumurl is required as far as I can tell. My links did not render correctly when $forumurl was replaced with $vboptions[bburl].
looks like you would still have to edit the php file to setup the chdir() function to get global.php, or include the full path to global.php.
I'd be very interested to see the code be rewritten to not need module configuration. Would really simplify things.
Max
P.S. Im still trying to figure out how to make it so I dont have a featured article
Just sent you the code as it's running on my site. With the alternating colors, and the other changes mentioned above. It will be interesting to see if you still get the same error messages.