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)
-   -   vb Sponsors (https://vborg.vbsupport.ru/showthread.php?t=50630)

Dean C 03-22-2003 05:30 PM

I'll be back online later after investigating :)

- miSt

VampireMan 03-22-2003 06:07 PM

looks good , will have an install sometime laters :-)

GoTTi 03-22-2003 06:22 PM

ok the attach ss shows the admin cp, modifying a forum with the options in there right....

everything is setup right, and u can see the Sponsor Views are recording when the forum is accessed, but there is no banner showing on the forum.

Dean C 03-22-2003 06:40 PM

Ok i feel so stupid. The reason this doesn't work is because i didn't include the modifcations to the 'forumdisplay' template.

I've updated the zip and if you have already installed this follow these instructions:

Quote:

In your 'forumdisplay' template find: :

----------------------------------------------------------------------

$forumdisplay[forumslist]

----------------------------------------------------------------------


+
+++
+

** Above ** it add:

----------------------------------------------------------------------

$fdopentable

----------------------------------------------------------------------


+
+++
+

Again in your 'forumdisplay' template find: :

----------------------------------------------------------------------

forumdisplay[threadslist]

----------------------------------------------------------------------


+
+++
+
Below ** it add:

----------------------------------------------------------------------

$getsponsor

----------------------------------------------------------------------
Then you should already have some code at the bottom of forumdisplay.php. Replace it with this:

PHP Code:

///// Forum sponsors (by mist) start ///////////
if ($foruminfo['sponsorname'] and $foruminfo['sponsorimage'] and $foruminfo['sponsorurl'] and $totalthreads>0)
{
   if (
$foruminfo[sponsorviews]=="0")
      {
    
$foruminfo[sponsorviews]=0;
      }

       
$foruminfo[sponsorviews]++;
       
$DB_site->query("UPDATE forum SET sponsorviews=$foruminfo[sponsorviews] WHERE forumid=$forumid");

       eval(
"\$fdopentable = \"".gettemplate('forumdisplay_opentable')."\";");
       eval(
"\$getsponsor = \"".gettemplate('forumdisplay_sponsor')."\";");
}
///// Forum sponsors (by mist) end /////////// 

Regards

- miSt

Mephisteus 03-22-2003 08:30 PM

Quote:

Today at 09:40 PM Mist said this in Post #24
Ok i feel so stupid. The reason this doesn't work is because i didn't include the modifcations to the 'forumdisplay' template.

I've updated the zip and if you have already installed this follow these instructions:



Then you should already have some code at the bottom of forumdisplay.php. Replace it with this:

PHP Code:

///// Forum sponsors (by mist) start ///////////
if ($foruminfo['sponsorname'] and $foruminfo['sponsorimage'] and $foruminfo['sponsorurl'] and $totalthreads>0)
{
   if (
$foruminfo[sponsorviews]=="0")
      {
    
$foruminfo[sponsorviews]=0;
      }

       
$foruminfo[sponsorviews]++;
       
$DB_site->query("UPDATE forum SET sponsorviews=$foruminfo[sponsorviews] WHERE forumid=$forumid");

       eval(
"\$fdopentable = \"".gettemplate('forumdisplay_opentable')."\";");
       eval(
"\$getsponsor = \"".gettemplate('forumdisplay_sponsor')."\";");
}
///// Forum sponsors (by mist) end /////////// 

Regards

- miSt



omg, youre trying to make it up to use by saying "Regards"??? :banana:

PS
I don't have any need for this hack yet. But I might in the near future.

GoTTi 03-22-2003 10:00 PM

lol

[high]* GoTTi smacks mist
[/high]

your not stupid pal ;)

GoTTi 03-22-2003 10:08 PM

ight it works...

question: How can I make it where if the link is clicked on it will open up in a new window...

ALSO...

is there a banner rotation that can be placed on this?

Floris 03-22-2003 11:48 PM

You can just add a target="_blank" to the <A> tag that holds the clickety.

I am also curious about rotation.

Dean C 03-23-2003 08:41 AM

Da_gotti - in your forumdisplay_sponsor template change this:

PHP Code:

<a href="$bburl/sponsor.php?s=$session[sessionhash]&name=$foruminfo[sponsorname]&forumid=$forumid"

To this:

PHP Code:

<a href="$bburl/sponsor.php?s=$session[sessionhash]&name=$foruminfo[sponsorname]&forumid=$forumidtarget="new"

_____________________

Xiphoid - i was expecting this ;), well the original idea was to have only one sponsor per forum. Adding a second banner or possibly more would mean adding an id field to the forum table for the banner and then for the other banner it would mean 5 new fields for the forum table. This IMO is a bit too much. However it is something i have in mind for the future :)

- miSt

Koopa 03-23-2003 02:11 PM

Nice hack, I may use this :)


All times are GMT. The time now is 05:26 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.01085 seconds
  • Memory Usage 1,758KB
  • 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
  • (4)bbcode_php_printable
  • (2)bbcode_quote_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