Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
[ADDON] cinq's vbArticles Latest 3 Featured Articles CMPS Module Details »»
[ADDON] cinq's vbArticles Latest 3 Featured Articles CMPS Module
Version: 1.1, by cinq cinq is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 02-21-2005 Last Update: 02-24-2005 Installs: 23
 
No support by the author.

A small addon to show the latest 3 featured articles on your Portal page.
This add on CMPS module is for cinq's vbArticles Hack v2.0

Hack version 1.1

Install instructions
===========================================

1. Upload the cmps-articles.php file to your modules directory.

2. Create 2 new templates:

a. First template:

adv_portal_articlesbits
Code:
	<tr>
		<td class="$getbgrow" width="100%">
		<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="0" class="tborder" width="100%">
		<tr>
		<td width="20%" align="center">$articonimg</td>
		<td width="80%" align="left"><span class="smallfont"><b>Title: <a href=$vboptions[bburl]/articles.php?action=viewarticle&artid=$articleid>$title</a></b>
		<br>$summary</span></td>
		</tr>
		</table>
		</td>
	</tr>
b. Second template:

adv_portal_articles
Code:
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
	<tr>
		<td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet] Featured Articles</strong></span></td>
	</tr>
$articlesbits
</table>
<br />
3. Next, perform the following file edits.

a. In your global.php file

FIND
PHP Code:
$specialtemplates array_merge($specialtemplates
        array(
            
'adv_modules',
            
'adv_portal_opts',
            
'attachmentcache',
            
'bbcodecache',
            
'birthdaycache',
            
'eventcache',
            
'iconcache',
            
'maxloggedin',
            
'smiliecache',
            
'userstats'
        
)
    ); 
REPLACE WITH
PHP Code:
$specialtemplates array_merge($specialtemplates
        array(
            
'adv_modules',
            
'adv_portal_opts',
            
'attachmentcache',
            
'bbcodecache',
            
'birthdaycache',
            
'eventcache',
            
'iconcache',
            
'maxloggedin',
            
'smiliecache',
            
'userstats',
            
'vbart_options'
        
)
    ); 
Save and upload global.php


b. In your includes/vba_cmps_include_top.php file

FIND
PHP Code:
$portalopts unserialize($datastore['adv_portal_opts']); 
ADD ABOVE
PHP Code:
$vbart_options unserialize($datastore['vbart_options']);
unset(
$datastore['vbart_options']); 
Save and upload includes/vba_cmps_include_top.php


4. 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'

5. Don't forget to update your index pages(s) to show the new module.

6. Done !

===========================================

Enjoy
- cinq

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 02-22-2005, 02:07 PM
ptmuldoon ptmuldoon is offline
 
Join Date: Feb 2005
Posts: 78
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Works great, except I had to modify the cmps-articles.php file on line 20 to correct for the image not showing on the home page. They originally showed only if you were within your forums page. Thus, I edited it to this

Code:
$articonimg = "<a href=\"$vboptions[bburl]/articles.php?action=viewarticle&artid=".$articleid."\"><img title=\"".$title."\" src=\"$vboptions[bburl]/articles.php?action=thumb&artid=".$articleid."&id=".$articon."\" border=\"0\" width=".$vbart_options['vbartssthumbwidth']."></a>";
Reply With Quote
  #3  
Old 02-22-2005, 02:33 PM
KTBleeding's Avatar
KTBleeding KTBleeding is offline
 
Join Date: Feb 2004
Location: Tooele, UT
Posts: 756
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks cinq.

And thanks ptmuldoon, I was just going to come report that..
Reply With Quote
  #4  
Old 02-23-2005, 08:25 AM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the feedback guys, I have editted the file and reuploaded it.

For those who installed this add-on prior to the date/time of this post, just download the attachment again, and upload it, overwriting your existing cmps_articles.php file.
Reply With Quote
  #5  
Old 02-23-2005, 11:20 AM
shadiguy1 shadiguy1 is offline
 
Join Date: Jul 2004
Location: Delco,Pa
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm i did didnt show up tho. im looking into it.
Reply With Quote
  #6  
Old 02-25-2005, 03:42 AM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Made some code change in the cmps-articles.php file.
If you had previously installed this add-on ( v1.0 ) please download the attachment ( v1.1 ) and upload it to your modules folder, overwriting the old file.

Everything else ( other steps highlighted in the first post ) remains the same.
Reply With Quote
  #7  
Old 02-25-2005, 04:28 AM
ncangler's Avatar
ncangler ncangler is offline
 
Join Date: Dec 2004
Location: North Carolina
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cinq, I cannot thank you enough for all the great work you'd put into this Articles system. I love it and it has added so much potential to my site. Thank you!
Reply With Quote
  #8  
Old 02-25-2005, 08:39 AM
Chief Corn Chief Corn is offline
 
Join Date: Nov 2002
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i'm not the greatest with html, so any chance someone can make a template to list horizontally as is done in the main article index? i'd appreciate it. excellent hack.
Reply With Quote
  #9  
Old 02-28-2005, 10:44 AM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You mean in columns instead Chief ?
Reply With Quote
  #10  
Old 02-28-2005, 06:55 PM
yannisc yannisc is offline
 
Join Date: Feb 2005
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi!

How can I make the image of the article on the main page be wrapped from the text rather than be left and the text right?

There was a hack that did something similar for the news posts on the vbadvanced cmps. Can we make the same here?

thanks, Yannis
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:41 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08849 seconds
  • Memory Usage 2,307KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (4)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete