vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Banners & Ads System (https://vborg.vbsupport.ru/showthread.php?t=74621)

shadiguy1 01-29-2005 07:21 PM

i installed this in 3.0.3 and it wont dosplay the banner but it is inside of my admincp will thius work with this version of Vb.

MentaL 01-29-2005 11:43 PM

anyone care to explain why it appears in navbar for me and not in the footer or any other place i insert the tag too?

www.ragezone.com

Rastus 01-30-2005 02:25 PM

I'm lost. Into what table or page does this go?

2. Master switch
==================================
INSERT INTO phrase (languageid, varname, text, phrasetypeid) VALUES (0, 'setting_enbanners_title', 'Enable Banners & Ads System', 5000);
INSERT INTO phrase (languageid, varname, text, phrasetypeid) VALUES (0, 'setting_enbanners_desc', 'If this option set to Yes, overal show banners and ads on navbar function will be turned on.', 5000);

INSERT INTO setting (varname, grouptitle, value, defaultvalue, optioncode, displayorder, advanced, volatile) VALUES ('enbanners', 'general', '1', '1', 'yesno', '1000', '0', '0');
==================================

AnhTuanCool 01-30-2005 04:20 PM

@Rastus - just run them as you run other queries.
@mentalrz - Did you INSTALL the Update?
@shadyguy1 - I'll try to install this hack on vb 3.0.3 later, see if it needs something else ;)

Rastus 01-30-2005 08:00 PM

Ok, so I can make the banners now, see them in the CP, but when I choose save I get this error : "Could not find phrase 'save_banners_x_successfully'."

PAWS 01-30-2005 10:01 PM

Great hack!

One question, I have 2 ad spots (top & bottom) and I was wondering if there was a way that they could show different banners instead of rotating in the same ones at the same time?

LauraFL 01-30-2005 10:07 PM

Ok. I still cannot get this to show up. The banner shows up in my ACP. But there is nothing on the forum.

Can someone please help me?

AnhTuanCool 01-31-2005 01:17 AM

@Rastus - Did you ADD the phrase as Control Panel Stop Message phrase type? If you ain't sure then re-add it and remember to choose Control Panel Stop Message as phrase type.

@PAWS - 1. Install the Update which I attached as txt file at this thread
2. Do this:
In your forumroot/global.php
Look for the whole code you've put in your global.php and REPLACE it with
PHP Code:

// Start banner rotating by Anhtuancool
if ($vboptions['enbanners'])
{
    
// select random banner and display it
    
$getbanner $DB_site->query_first("SELECT title, html, url, type, status, width, height FROM " TABLE_PREFIX "banners WHERE status = '1' ORDER BY RAND() LIMIT 1");
    
    eval(
'$banner = "' fetch_template('banner') . '";');
    
$avoidid $getbanner['adid'];
    unset(
$getbanner);

    
// select random banner and display it secplace
    
$getbanner $DB_site->query_first("SELECT title, html, url, type, status, width, height FROM " TABLE_PREFIX "banners WHERE status = '1' AND adid != $avoidid ORDER BY RAND() LIMIT 1");
    
    eval(
'$banner2 = "' fetch_template('banner') . '";');
    unset(
$getbanner);
}
// End banner 

Save, and place $banner2 in the footer or wherever you want your second banner slot to show up. :)

@LauraFL - try to install the Update txt which I attached in this thread.

Rastus 01-31-2005 01:23 AM

No, I did not. somehow I missed those

the "phrase" is another SQL Query ?

AnhTuanCool 01-31-2005 01:37 AM

Take a look at the attachment see what I was talking about ;)


All times are GMT. The time now is 01:47 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.01203 seconds
  • Memory Usage 1,744KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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