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
  #32  
Old 04-06-2005, 07:03 PM
subnet_rx subnet_rx is offline
 
Join Date: Mar 2005
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've installed this hack but can't get it to show up, what should I check? What do you mean by refreshing the index page? I'm using vBAdvanced.

EDIT: I just installed the top_rep hack for vBA with no problems. The box for this hack isn't even showing up.
Reply With Quote
  #33  
Old 04-08-2005, 02:52 AM
ncangler's Avatar
ncangler ncangler is offline
 
Join Date: Dec 2004
Location: North Carolina
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've installed everything identical to my 3.0.5 setup on another site but this 3.0.7 install doesn't show the image on the CMPS page. It shows fine within the Articles portion of the site. (www.triumphowners.org)

Any ideas?
Reply With Quote
  #34  
Old 04-08-2005, 02:54 AM
ncangler's Avatar
ncangler ncangler is offline
 
Join Date: Dec 2004
Location: North Carolina
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In the attached photo you'll notice that there is a larger border on the middle of three articles being featured on the CMPS page. How can I change the border on the center display so that all three featured articles look the same? Thanks!

I'll bet it is the alternating colors 1 and 2 isn't it? How would I override that for this display?
Reply With Quote
  #35  
Old 04-08-2005, 03:12 AM
ncangler's Avatar
ncangler ncangler is offline
 
Join Date: Dec 2004
Location: North Carolina
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm stumped. I've done everything I can think of but the image does not show up on the CMPS page. I've attached an image showing the article image displayed on the ARticles page and an image that shows the image no show on the CMPS.

It is very strange cause it works on one of my sites but not the other. The files on both sites are identical (except path info). The only difference between the two sites is that the one that works is running vBulletin 3.0.5 and the one that doesn't is running 3.0.7. Any ideas are appeciated. Thanks.
Reply With Quote
  #36  
Old 04-08-2005, 03:16 AM
ncangler's Avatar
ncangler ncangler is offline
 
Join Date: Dec 2004
Location: North Carolina
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Be sure to activate the new module (mine is called "Featured Articles") in your AdminCP (vBa CMPS, Edit Modules, Featured Articles). Then you need to make sure it is turned on for the particular page where you want it to appear. I have mine on my main page so I edit the Default/Home Page (AdminCP, vBa CMPS, Edit Pages, Default/Home Page). Hope this helps!

Quote:
Originally Posted by subnet_rx
I've installed this hack but can't get it to show up, what should I check? What do you mean by refreshing the index page? I'm using vBAdvanced.

EDIT: I just installed the top_rep hack for vBA with no problems. The box for this hack isn't even showing up.
Reply With Quote
  #37  
Old 04-08-2005, 05:31 PM
subnet_rx subnet_rx is offline
 
Join Date: Mar 2005
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yep, both are checked. I may move away from this system anyway, since it will be paid in the future.
Reply With Quote
  #38  
Old 04-10-2005, 12:05 PM
redcow redcow is offline
 
Join Date: Apr 2005
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks
Reply With Quote
  #39  
Old 04-12-2005, 12:21 AM
ncangler's Avatar
ncangler ncangler is offline
 
Join Date: Dec 2004
Location: North Carolina
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay I've got to quit working on the computer so much. I found the problem. Somehow in the process of editing three sites I forgot to add the vba_cmps_include_top.php edit. Sorry!

Quote:
Originally Posted by ncangler
I'm stumped. I've done everything I can think of but the image does not show up on the CMPS page.
Reply With Quote
  #40  
Old 04-14-2005, 01:59 PM
TTG's Avatar
TTG TTG is offline
 
Join Date: May 2004
Location: Sth London
Posts: 1,042
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and module shows without picture .. when I try and add the vba_cmps_include_top.php edited file I receive error :-

Code:
Database error in vBulletin 3.0.6:

Invalid SQL:  
    SELECT a.title, a.articles_articleid, a.icon, SUM(r.rating) / COUNT(r.rating) avg 
    FROM articles_article a 
    LEFT JOIN articles_rating r 
    ON a.articles_articleid = r.articleid 
    WHERE a.featured=1 
    GROUP BY a.articles_articleid 
    ORDER BY RAND() 
    LIMIT  
    
mysql error: You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 8

mysql error number: 1064
Reply With Quote
  #41  
Old 06-10-2005, 12:26 PM
kissmans kissmans is offline
 
Join Date: May 2004
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

please tell me what happen when i install it.



Quote:
SELECT a.article_articleid, a.title, a.summary, a.iconid
FROM nhactinhvienxu_us_-_diendan.article a
LEFT JOIN nhactinhvienxu_us_-_diendan.article_category c
ON a.categoryid = c.article_categoryid
WHERE a.categoryid != '0' AND a.draft !='1' AND a.featured=1
ORDER BY a.publishdate DESC
LIMIT 3
mysql error: You have an error in your SQL syntax near '-_diendan.article a
LEFT JOIN nhactinhvienxu_us_-_diendan.article_catego' at line 3

My Full Database infor


Database nhactinhvienxu_us_-_diendan - Table article running on localhost
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 01:50 AM.


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.04645 seconds
  • Memory Usage 2,329KB
  • Queries Executed 25 (?)
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
  • (3)bbcode_quote
  • (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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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