Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vb Sponsors Details »»
vb Sponsors
Version: 1.00, by Dean C Dean C is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 03-21-2003 Last Update: 03-21-2003 Installs: 38
 
No support by the author.

vB Sponsors
by Mist


Description:

Wow my first major hack is finally here. This hack allows you to add sponsors to forums via the administrators control panel. You can only have one sponsor per forum. The way in which this hack differs from all others is that it displays it inside the forum (in forumdisplay.php). It allows you to select a sponsor name, image, url, and log views and clicks for each banner (which are all editable via the administrators control panel).

Features:
  • Sponsors on forumdisplay
  • Easily edit your sponsors for each forum via the Admin CP
  • Logs clicks and views for each sponsor
  • A wide variety of customizable options via the Admin CP (coming soon)


Installation:
  • Simply follow the instruction in the attachment

Credits:
  • NanoEntity for guidance on the click logging.

Show Your Support

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

Comments
  #22  
Old 03-22-2003, 05:30 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'll be back online later after investigating

- miSt
Reply With Quote
  #23  
Old 03-22-2003, 06:07 PM
VampireMan VampireMan is offline
 
Join Date: Jan 2003
Location: Leicestershire uk
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

looks good , will have an install sometime laters :-)
Reply With Quote
  #24  
Old 03-22-2003, 06:22 PM
GoTTi GoTTi is offline
 
Join Date: Jun 2002
Posts: 1,346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #25  
Old 03-22-2003, 06:40 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #26  
Old 03-22-2003, 08:30 PM
Mephisteus's Avatar
Mephisteus Mephisteus is offline
 
Join Date: Dec 2001
Location: The Netherlands
Posts: 288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #27  
Old 03-22-2003, 10:00 PM
GoTTi GoTTi is offline
 
Join Date: Jun 2002
Posts: 1,346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lol

[high]* GoTTi smacks mist
[/high]

your not stupid pal
Reply With Quote
  #28  
Old 03-22-2003, 10:08 PM
GoTTi GoTTi is offline
 
Join Date: Jun 2002
Posts: 1,346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #29  
Old 03-22-2003, 11:48 PM
Floris Floris is offline
 
Join Date: Jan 2002
Posts: 1,898
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

I am also curious about rotation.
Reply With Quote
  #30  
Old 03-23-2003, 08:41 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #31  
Old 03-23-2003, 02:11 PM
Koopa Koopa is offline
 
Join Date: Nov 2001
Posts: 60
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice hack, I may use this
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 06:36 PM.


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.04948 seconds
  • Memory Usage 2,328KB
  • 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
  • (4)bbcode_php
  • (2)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
  • (4)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