View Single Post
  #24  
Old 06-15-2003, 06:59 AM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ADD-ON 1


Was reading up at teckwizards.com with regards to integration this hack w vbHome as requested.

Came upon this thread.

If going by Arunan's instructions, the following instructions should give you similiar result for having articles display on your vbHome portal page.

This add-on assumes you have vbHome installed.

Installation

STEP 1
Open the index.php from the vBhome hack, and find:
PHP Code:
// latest threads
$threadbits '';
$threadmaxnumber '';
if (
$threadmax!=0) {
  
$threadmaxnumber "LIMIT $threadmax";

ABOVE that code ADD:
PHP Code:
// vbArticles
$ebg $DB_site->query("SELECT * FROM vbArticles_cat ORDER BY catname");
if (
$DB_site->num_rows($ebg)) {
  while (
$myrow=$DB_site->fetch_array($ebg)) {
            
$hasattach=1;
            
$catid=$myrow["artcatid"];
            
$catname=$myrow["catname"];
            
$catdesc=$myrow["catdesc"];
      eval(
"\$catlistbit .= \"".gettemplate('home_articlecatbit')."\";");
  }
}
eval(
"\$vbhacats .= \"".gettemplate('home_articlemain')."\";"); 
Still in the index.php file find: (This will reduce your queries by 1 or 2)
PHP Code:
$templatesused 'home,home_articlebits,home_footer,home_header,home_headinclude,home_thread,home_threadbits,home_welcomeguest'
and REPLACE with:
PHP Code:
$templatesused 'home,home_articlebits,home_footer,home_header,home_headinclude,home_thread,home_threadbits,home_welcomeguest,home_articlemain,home_articlecatbit'
Save the index.php file

STEP 2

Create a new Template, and call it home_articlemain, put the following code in :
PHP Code:
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#555576"  width="100%">
<
tr>
<
td>
<
table cellpadding="4" cellspacing="1" border="0"  width="100%">
<
tr id="cat">
          <
td bgcolor="#606096"><smallfont><font color="#FFF788"><b>Articles</b></font></smallfont></td>
</
tr>
$catlistbit
</table>
</
td>
</
tr>
</
table>
<
br
Create another template and call it home_articlecatbit and put in this code :
PHP Code:
<tr>
<
td bgcolor="#13486D"><smallfont>
<
b><a href="$bburl/articles.php?s=$session[sessionhash]&action=viewcat&catid=$catid">$catname</a></b><br>
$catdesc
</smallfont></td>
</
tr
STEP 3

Now open the home template from the vBhome template group, and find:
PHP Code:
$advertisement 
below it ADD:
PHP Code:
$vbhacats 

Not tested on my end

- If you have this working on your vbHome site , pls let me know your site URL so i can add it as a demo for this add-on.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01343 seconds
  • Memory Usage 1,807KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_php
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.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_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • 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
  • showpost_complete