vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   vBaffiliates5 - Allow Users to Add & Edit their Own Affiliate Links!!! (https://vborg.vbsupport.ru/showthread.php?t=47008)

Chris M 01-02-2003 09:39 PM

I see:)

Maybe the Top 5 should be Images (the banners), the 6-10 should be Bolded links, and the rest are randomnly generated?:)

Satan

Logik 01-02-2003 10:52 PM

That would be great. but what i think hes saying is. On his forum home. VBINDEX.. He wants to have the top 5 displayed on there in text.. I believe thats what hes saying.

Chris M 01-03-2003 07:31 AM

That is doable:)

As long as it is vBindex not vBhome - I'm not sure how to integrate it now...

Satan

colicab-d 01-03-2003 04:55 PM

no i just need say a random 5 on my home :D and its vbindex ;)

Chris M 01-03-2003 07:27 PM

Ok:)

Let me check the file and post a modification for you:)

Satan

colicab-d 01-03-2003 08:02 PM

great dude thnx hey add me on msn if u got it :)

Chris M 01-03-2003 08:29 PM

Added you:)

Satan

DarkDraco07 01-26-2003 02:31 AM

how come this is adding 2 queries per page? how can i make it only add queries to my homepage, not all

Chris M 01-26-2003 11:03 AM

@DarkDraco07 - It depends where you want it to show...;)

By default, I made it globalised, so you can add it to your header template:)

If you want it to only add to index, revert the global.php change, remove the variable from the header template, and add it to the forumhome template...

Then open forum/index.php (this is untested)
Find:
Code:

// if user is know, then welcome
if ($bbuserinfo['userid']!=0) {
  $username=$bbuserinfo['username'];
  eval("\$welcometext = \"".gettemplate('forumhome_welcometext')."\";");
  eval("\$logincode = \"".gettemplate('forumhome_logoutcode')."\";");
  eval("\$newposts = \"".gettemplate('forumhome_newposts')."\";");

} else {
  $welcometext = "";
  eval("\$newposts = \"".gettemplate('forumhome_todayposts')."\";");
  eval("\$logincode = \"".gettemplate('forumhome_logincode')."\";");
}

add below:
Code:

// ###################### vBaffiliates Stuff #########################

// vBaffiliates stuff

$affillinky = $DB_site->query("SELECT linkid,name,link,b_link,height,width,hits,userid FROM vbaffiliates WHERE moderated='1' ORDER BY RAND() LIMIT $maxbannernumbers");
  while ($affillink=$DB_site->fetch_array($affillinky)) {
         
                  if ($bbuserinfo[userid]==$affillink[userid]) {
                    $editlink = " <a href=\"vbaffiliates.php?s=$session[sessionhash]&action=useredit&linkid=$affillink[linkid]\">Edit</a>";
                  }else{
                    $editlink = "";
                  }
         
                  if ($imginfo=@getimagesize($affillink[b_link])) {
                    if ($imginfo[0]>$affillink[width] or $imginfo[1]>$affillink[height]) {
                            $affiliate = "";
                    }else{
                            eval("\$affiliate .= \"".gettemplate('affiliate')."\";");
                    }
          }
}

:)

Satan

DarkDraco07 01-26-2003 08:26 PM

there was a variable in the header template??


All times are GMT. The time now is 04:57 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.00978 seconds
  • Memory Usage 1,737KB
  • 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
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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