vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   v3Articles - vBa CMPS module (https://vborg.vbsupport.ru/showthread.php?t=66256)

maximux1 06-16-2004 10:00 PM

v3Articles - vBa CMPS module
 
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".

http://www.marijuana.com

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

Logikos 06-17-2004 08:57 PM

Sweet one man, Will be using this.

/me Installs

wcbryant 06-17-2004 10:32 PM

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.

maximux1 06-17-2004 11:39 PM

Quote:

Originally Posted by wcbryant
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 ;)

MindTrix 06-17-2004 11:47 PM

<a href="https://vborg.vbsupport.ru/showthread.php?&threadid=66237" target="_blank">https://vborg.vbsupport.ru/showt...threadid=66237</a>

isnt it the same as this?

maximux1 06-17-2004 11:49 PM

Quote:

Originally Posted by MindTrix

Na, his shows part of the "featured article" in a module whereas this shows the most recent 10 articles submitted.

MindTrix 06-17-2004 11:50 PM

oh ok, thank you for clearing that up

maximux1 06-17-2004 11:54 PM

Quote:

Originally Posted by MindTrix
oh ok, thank you for clearing that up

no problem - perhaps I should try to make the description more clear.

Sorry for any confusion.

wcbryant 06-18-2004 12:33 AM

Quote:

Originally Posted by maximux1
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 ;)

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.

Rick 06-20-2004 02:48 AM

Have you looked at your page with Mozilla?? I'm using 1.6 and my screen resolution is 1024x768. Your page scrolls WAY... over to the right...


All times are GMT. The time now is 01:42 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01007 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete