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)

AnhTuanCool 01-18-2005 10:00 PM

Banners & Ads System
 
Banners & Ads System
---------------------------------
by AnhTuanCool

Fully Tested on vb 3.0.5

Description:
Banners & Ads System allows you to have a slot on every pages in your forum for showing banners and ads. Banners and ads in database will randomly pickout to show everytime new page is loaded. Admin options in admincp allow you to fully administrate your banners and ads.

Feautures:
- Show Random Banner or Ad on everypage
- Clickable Link (of course :D)

Admin Feautures:
- Master Switch on/off
- Fully Add/Edit/Delete Banners, Ads Factors (such as title, dimension, links, etc...)
- Enable/Disable Banners To Be Shown (if you set Disable to a banner, it will not show)
- Banner Template Layout Alterable
- Show Banner Anywhere on your global templates

Updates:
Jan 28th - Add update to display banner anywhere rather than the nav

Install Instruction and Screenshots:
See attachments.

If you find this hack useful, also get informed by any new release & update, please click INSTALL. Thanks,

Amavisca 01-19-2005 02:19 AM

Sound interesting tuan. Thnx man. I will give it a try

Itworx4me 01-19-2005 02:44 AM

Looks interesting.

Any way for you to add banner clicks and have them counted ?
Also would be nice to have a user interface to show the stats of the banner to the purchaser.

Thanks,
Itworx4me

yoyoyoyo 01-19-2005 04:28 AM

Interesting idea. It would be nice to have an option with each image to allow the admin to select which usergroups will be shown which banners. For instance I may want all non-registered userd to see banners for my site, and then reigstered users would see a different set of banners, and then moderators would see none, or only a few, etc. based on the prefs set up by the admin.

reteep 01-19-2005 07:19 AM

Hi,

cool hack. However, a option to choose in which Forum or Category the Banner shows up would be very nice!

BarHopper 01-19-2005 05:46 PM

It would be better if the banner was central. Other than that, excellant hack.

snyx 01-19-2005 05:49 PM

Quote:

Originally Posted by Itworx4me
Looks interesting.

Any way for you to add banner clicks and have them counted ?
Also would be nice to have a user interface to show the stats of the banner to the purchaser.

Thanks,
Itworx4me

This is one step back from the exact script I have been waiting for. Great additon to see FLASH incorperated. Awesome. However, missing click tracking. Keep up the good work.

Does this hack allow me to only rotate one slot? What if I wish to show two banners or more at once?

AnhTuanCool 01-19-2005 07:55 PM

@yoyoyoyo, stormblast - those need some or more lines of code and would be easy to made, if you really want a custom work, you can contact me individually :)

@snyx, Itworx4me - I will consider making that Add-Ons soon, thanks for suggest!
@snyx - if you want to have two or more slots running simultaneously, contact me individually ;)

The eyes lover 01-20-2005 02:46 AM

great hack,but in this picture the banner not come in middle of the page,i don't way !

https://vborg.vbsupport.ru/attachmen...&stc=1&thumb=1

thank you

nguyenvuan 01-20-2005 02:50 AM

Can I use show random banner? If yes, how can I do?

And can I add multiplace banner? Ex: I have 2 banners, I wanna show 1 at top and 1 at bottom, coudn't I?

nguyenvuan 01-20-2005 03:05 AM

Quote:

Originally Posted by The eyes lover
great hack,but in this picture the banner not come in middle of the page,i don't way !

https://vborg.vbsupport.ru/attachmen...&stc=1&thumb=1

thank you

Here the way :D

Replace banner templates with
Code:

<!-- Banner Rotation by AnhTuanCool -->
<table align="center" border="0">
<div class="smallfont" style="float:left">
        <if condition="$getbanner[type] == 1">
                    <a href="$getbanner[url]" target="_blank"><img src="$getbanner[html]" width="$getbanner[width]" height="$getbanner[height]" alt="$getbanner[title]" border="0" align="center"/></a>
        <else />
                <OBJECT CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" WIDTH="$getbanner[width]" HEIGHT="$getbanner[height]" CODEBASE="http://active.macromedia.com/flash6/cabs/">
                <PARAM NAME="MOVIE" VALUE="$getbanner[html]">
                <PARAM NAME="PLAY" VALUE="true">
                <PARAM NAME="LOOP" VALUE="true">
                <PARAM NAME="QUALITY" VALUE="high">
                <embed src="$getbanner[html]" width="$getbanner[width]" height="60" play="true" loop="true" quality="high" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed>
                </OBJECT>
        </if>
</div>
</table>
<!-- Banner Rotation by AnhTuanCool -->


lanc3lot 01-20-2005 06:58 PM

Can we have a demo site plz?

There is a "similar" hack like this available, but that one, doesnt work for Netscape or Firefox users..and want to test if yours hack is working ok:)

Excellent hack, hope u add to it some features soon(like stats mostly).

Ps

Its "appear" in all pages or just forum home?
:)

AnhTuanCool 01-20-2005 08:46 PM

It's appeared in all pages because the extra banner template that I added is on the nav bar, and you see your nav everypage ;)

lanc3lot 01-20-2005 11:48 PM

lol:) clever i have to admit:)

Hope someone can show us a demo link, so i can test it with firefox/netscape use:)

AnhTuanCool 01-21-2005 12:11 AM

I guarantee you this hack works on both IE and FireFox, but still unsure about Netscape because I don't have this kind of browser. But technically I can say that it will also work, because I combine both EMBED and OBJECT tag for flash type banner - standard way to make the flash show up in most of the browsers.

If you prefer a demo, check out my site http://yeuamnhac.com/music/ , login is not required.

lanc3lot 01-21-2005 01:09 AM

Damn just tryed to test it with Netscape and i see the following message:

There seems to have been a slight problem with the database.
Please try again by pressing the refresh button in your browser.

An E-Mail has been dispatched to our Technical Staff, who you can also contact if the problem persists.

We apologise for any inconvenience

I also see that, with my IE:(

Anyway i will give it a try tommorow, its 5 in the morning here, better to sleep little:D


Its a great hack mate, u should feel proud :)

Ps

Any possible stats to be added(i only ask as i am ready to install after i test:D)

AnhTuanCool 01-21-2005 03:22 AM

The server had been overloaded lately, but it's up right now.

Thank you for your appreciation, I will work on the stats as soon as I can. Thanks, :)

lanc3lot 01-21-2005 08:47 AM

Yep just checked, it works fine with Netscape, Firefox and of course IE.

Waiting for the stats addon, to install it:)(u may i think also add in the main page of the hack, the directions to center the "banner" in the pages(i think its in the previous page :P) )


Well done mate, i am curious that this hack didnt got yet at least 4 pages of replies yet...there are not any "adv" hacks available(any good at least :) )

Ps

Can u please release also an uninstall script for this hack? No need really yet, as i havent installed it, but i ask from now on, every hack designer i am intrested, to have it just in case:)

nguyenvuan 01-21-2005 10:42 AM

But it didn't works if you had install Welcome panel :(

@AnhTuanCool: answer my question, please! Thanks

Itworx4me 01-26-2005 04:36 PM

I installed this hack. And it won't display the banner in the Header template. I put the code in the navbar template and it works great. But I don't want to display it there. Any Ideas how to get this to work in the Header template???

Thanks,
Itworx4me

xtreme2 01-27-2005 08:05 PM

hey, I installed the script, but I don't want it to show up in the navbar (have other stuff there). I am wanting it to be above the Advertising Section of my site (http://forums.probe-enthusiast.com/) When I have it in the navbar, it works fine, but anywhere else, it doesn't want to show up at all... any help?

Itworx4me 01-27-2005 09:10 PM

I found that this works in the phpinclude_start template. Make sure you delete this file from the gobal.php file or it won't work.
PHP Code:

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') . '";');
    unset(
$getbanner);


One thing I have found with this script is that it doesn't rotate. Does anyone else have this problem??

Thanks,
Itworx4me

AnhTuanCool 01-28-2005 01:07 AM

Place $banner where you want your banners to be displayed. Make sure you remove $banner in your navbar template if you don't want it to show one banner twice at a time.

@Itworx4me - what do you mean by the script doesn't rotate?

Itworx4me 01-28-2005 03:11 AM

For some reason the banner doesn't rotate. Just stays on the first banner all the time. Not sure what can be done to fix this.

Thanks,
Itworx4me

xtreme2 01-28-2005 03:36 AM

alright, cool, works for me now... rotates and everything... thanks!

AnhTuanCool 01-28-2005 04:01 AM

@xtreme2 - thanks ;)

@Itworx4me - to make a banner to display, you have to set its status to ON. Otherwise I cannot find any problem along with my forum and other customer ones.

LauraFL 01-28-2005 04:36 PM

I have it all installed but my banner is not showing up where I placed the $banner. I made sure that it is turned on and it show the banner correctly in the acp.

Any ideas?

detalhe 01-28-2005 06:40 PM

Same here, it works only inside the main page, not above the navbar for example

AnhTuanCool 01-28-2005 08:09 PM

I've added the update allow you to display your banner anywhere else you want depend on where you place your $banner variable. Have fun ;)

shadiguy1 01-29-2005 07:21 PM

i installed this in 3.0.3 works great Question i have is there anyway to have this display a few banners at the same time i have it displaying currently under my header what i ean is like 3 diffrent banners same time.

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 06:19 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.01439 seconds
  • Memory Usage 1,840KB
  • 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_code_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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