Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

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

Version: 3.0.7 Rating:
Released: 02-27-2005 Last Update: Never Installs: 6
 
No support by the author.

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

Hack version 1.0


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

1. In your 'FORUMHOME' template

FIND :
Code:
<!-- main -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
ADD BELOW :
Code:
<!-- vbArticles Featured Articles -->
<thead>
<tr>
<td class="thead" colspan="5">
<span style="float:$stylevar[right]"><a href="articles.php">More articles here</a></span>
Featured Articles in the $vbphrase[vbarticles]
</td></tr>

<tr>
<td class="alt1" colspan="5">
 <table cellpadding="$stylevar[cellpadding]" cellspacing="1" border="0" width="100%">
     <tr>
   $featuredbitonforumhome
    </tr>
    </table>
</td></tr>
</thead>
<!-- /vbArticles Featured Articles -->

2. Create a new template : 'vbArticles_featuredbitonforumhome'
Code:
<td valign="top" align="center" class="alt2" width="33%">
<br>$articonimg<br>
<a href="articles.php?action=viewarticle&artid=$artid">
<span class="smallfont"><b>$title</b></span></a>
<br>$starrating<br><br></td>

3. Make the following code changes to your forum index.php

FIND:
PHP Code:
$specialtemplates = array(
    
'userstats',
    
'birthdaycache',
    
'maxloggedin',
    
'iconcache',
    
'eventcache',
    
'mailqueue'
); 
REPLACE WITH:
PHP Code:
$specialtemplates = array(
    
'userstats',
    
'birthdaycache',
    
'maxloggedin',
    
'iconcache',
    
'eventcache',
    
'mailqueue',
    
'vbart_options'
); 
FIND:
PHP Code:
require_once('./includes/functions_forumlist.php'); 
ADD BELOW:
PHP Code:
$vbart_options unserialize($datastore['vbart_options']);
unset(
$datastore['vbart_options']); 

FIND :
PHP Code:
// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTA HERE... ### 
ADD ABOVE :
PHP Code:
########################### vbArticles Hack by cinq ##############################
$artquery $DB_site->query("
    SELECT a.title, a.articles_articleid, a.icon, SUM(r.rating) / COUNT(r.rating) avg
    FROM " 
TABLE_PREFIX "articles_article a
    LEFT JOIN " 
TABLE_PREFIX "articles_rating r
    ON a.articles_articleid = r.articleid
    WHERE a.featured=1
    GROUP BY a.articles_articleid 
    ORDER BY RAND()
    LIMIT "
.$vbart_options['numfeaturedarticlehome']."
    "
);

if(
$DB_site->num_rows($artquery)>0
{
  while(
$artlisting=$DB_site->fetch_array($artquery))
  {
      
$artid=$artlisting['articles_articleid'];
    
$title=$artlisting['title'];
    
$articon=$artlisting["icon"];
    
$rated round($artlisting['avg']);
    
$starrating ="<img src=\"$stylevar[imgdir_rating]/rating_".$rated.".gif\" alt=\"Rating: $rated/5\" border=\"0\">";
    
$articon ereg_replace($vbart_options['vbartartimgpathab'].$artid.'/',"",$articon);
    
$articonimg "<img title=\"".$title."\" src=\"articles.php?action=thumb&artid=".$artid."&id=".$articon."\" border=\"0\" width=".$vbart_options['vbartssthumbwidth'].">";
      eval(
'$featuredbitonforumhome .= "' fetch_template('vbArticles_featuredbitonforumhome') . '";');
  }
}
########################### vbArticles Hack by cinq ############################## 
Save and upload index.php


4. Done

- cinq

Show Your Support

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

Comments
  #12  
Old 03-05-2005, 01:06 PM
shadiguy1 shadiguy1 is offline
 
Join Date: Jul 2004
Location: Delco,Pa
Posts: 146
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i noticed sinse installing this it always says alot of people are viewing aticles section even if there not . Any suggestions.
Reply With Quote
  #13  
Old 03-05-2005, 03:38 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Curious, why have you released an addon to your own hack as a seperate hack in the addons section.
Reply With Quote
  #14  
Old 03-06-2005, 12:15 AM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think this is the only way the addon gets linked to the main hack in the main hack thread's add-ons side bar ?

Correct me if I'm wrong ( i did ask this in the Site feedback section a while back ).
Reply With Quote
  #15  
Old 03-06-2005, 07:16 AM
Creed's Avatar
Creed Creed is offline
 
Join Date: May 2002
Location: The Matrix
Posts: 281
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yup, that is correct
Reply With Quote
  #16  
Old 04-01-2005, 05:44 PM
subnet_rx subnet_rx is offline
 
Join Date: Mar 2005
Posts: 294
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone want to post a demo of this?
Reply With Quote
  #17  
Old 04-05-2005, 07:23 PM
RichieBoy67's Avatar
RichieBoy67 RichieBoy67 is offline
 
Join Date: Apr 2004
Location: CT - Down in a hole..
Posts: 3,057
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, screenshot please or demo??? I am waiting to install until I can see it...

Thanks
Reply With Quote
  #18  
Old 04-12-2005, 09:51 AM
She Unlimited She Unlimited is offline
 
Join Date: Jan 2005
Location: London, Tokyo, US
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would someone help me install this? Paid
Reply With Quote
  #19  
Old 06-01-2005, 03:12 AM
mike.fro mike.fro is offline
 
Join Date: Mar 2005
Location: Minnesota
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

http://www.discusspromotion.com has it up (my site).

link:
http://www.discusspromotion.com/articles.php? is the hack.
Reply With Quote
  #20  
Old 06-27-2005, 11:52 PM
She Unlimited She Unlimited is offline
 
Join Date: Jan 2005
Location: London, Tokyo, US
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

index.php Which template do I go into to make these changes...(sorry a bit new to doing hacks myself).

Thank you

Also, how do I change the width to reflect the width of my Featured Articles now?

:nervous:
Reply With Quote
  #21  
Old 06-28-2005, 07:15 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

index.php is not a template but a file in either your forumhome, or your ./admincp directory (read hack instructions carefull to find out which to edit).
Reply With Quote
Reply

Thread Tools

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 05:07 PM.


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.08479 seconds
  • Memory Usage 2,319KB
  • 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
  • (6)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
  • (1)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