vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Miscellaneous Hacks - Banner Rotator (Definitive Mod) **UPDATED** (https://vborg.vbsupport.ru/showthread.php?t=133954)

stinger2 02-02-2007 03:42 PM

this should be builtin in vbulletin......its just great

RichieBoy67 02-03-2007 03:50 PM

I commented on the Wrong mod... Please remove this post..

Thanks

marcsmith73 02-04-2007 12:34 AM

When will be able to add URLs?

amagazi 02-04-2007 06:39 PM

Good question.. I'm on the verge of installing, but what retailer in their right mind will pay me for an advertisement that doesn't even link to their website?

Ac0l0n 02-09-2007 08:11 AM

Everytime i try and upload the xml it gives me a error why?

MySQL Error : Table 'banners' already exists
Error Number : 1050
Date : Friday, February 9th 2007 @ 03:12:33 AM
Script : http://www.vbulletin-admin.com/forum...=productimport
Referrer : http://www.vbulletin-admin.com/forum...?do=productadd
IP Address : 70.252.165.244
Username : Ac0l0n
Classname : vb_database

MTVSlick 02-09-2007 10:29 AM

Quote:

Originally Posted by Tuga?? (Post 1138493)
in my one i dont find

PHP Code:

<img src="$stylevar[titleimage]border="0" alt="$vboptions[bbtitle]/> 

any help ?
thank you

PHP Code:

<META http-equiv=Page-Exit content=BlendTrans(Duration=0)>
<
META http-equiv=Page-Enter content=BlendTrans(Duration=0)>
<
script type="text/javascript" src="snow.js"></script>
<!-- 
logo -->
<
a name="top"></a>
<
center>
<
table border="0" width="100%" cellpadding="0" cellspacing="0" align="center" background="$stylevar[imgdir_misc]/head_back.gif">
<
tr>
<
td valign="top" width="965"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/head_left.gif" width="965" border="0"></a></td>
</
tr>
</
table>
</
center>

<!-- /
logo -->
<!-- 
Navigation bar -->
    <
table width="100%" style="background-image:url($stylevar[imgdir_misc]/nav.jpg)" align="center" border="0" cellpadding="0" cellspacing="0">
    <
tr>
    <
td align="left" valign="top" height="87">
        
<
table width="50%"  align="center" border="0" cellspacing="0" cellpadding="0">
  <
tr>
               <
td align="left" valign="top" width="100" height="87"><a href="$vboptions[forumhome].php$session[sessionurl_q]accesskey="1"><img src="$stylevar[imgdir_misc]/nav_home.jpg" width="100" height="87" border="0" alt="" /></a></td>
                <if 
condition="$show['registerbutton']">
        <
td width="100" height="87"><a href="register.php$session[sessionurl_q]rel="nofollow"><img src="$stylevar[imgdir_misc]/nav_reg.jpg" width="100" height="87" border="0" alt="" /></a></td>
        <else />
        <
td width="100" height="87"  id="usercptools"><a href="$show[nojs_link]#usercptools"><img src="$stylevar[imgdir_misc]/nav_link.jpg" width="100" height="87" border="0" alt="" /></a><script type="text/javascript"vbmenu_register("usercptools" ,1); </script></td>
        </if>
        <
td align="left" valign="top" width="100" height="87"><a href="memberlist.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/nav_member.jpg" width="100" height="87" border="0" alt="" /></a></td>
        <
td align="left" valign="top" width="100" height="87"><a href="usercp.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/nav_usercp.jpg" width="100" height="87" border="0" alt="" /></a></td>
        <
td align="left" valign="top" width="100" height="87"><a href="calendar.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/nav_cal.jpg" width="100" height="87" border="0" alt="" /></a></td>
        <
td align="left" valign="top" width="100" height="87" id="navbar_search"><a href="search.php$session[sessionurl_q]accesskey="4" rel="nofollow"><img src="$stylevar[imgdir_misc]/nav_search.jpg" width="100" height="87" border="0" alt="" /></a><script type="text/javascript"vbmenu_register("navbar_search" ,1); </script></td>
        <
td align="left" valign="top" width="100" height="87"><a href="faq.php$session[sessionurl_q]accesskey="5"><img src="$stylevar[imgdir_misc]/nav_faq.jpg" width="100" height="87" border="0" alt="" /></a></td>
    
  </
tr>
</
table>
        </
td>
    </
tr>
</
table>

<if 
condition="$show['popups']">
<!-- 
NAVBAR POPUP MENUS -->
    
    <if 
condition="$show['searchbuttons']">
    <!-- 
header quick search form -->
<
div class="vbmenu_popup" id="navbar_search_menu" style="display:none">
<
form action="search.php?do=process" method="post">
<
table cellpadding="4" cellspacing="1" border="0">
<
tr>
<
td class="thead">$vbphrase[search_forums]</td>
</
tr>
<
tr>
<
td class="vbmenu_option" title="nohilite">
<
input type="hidden" name="do" value="process" />
<
input type="hidden" name="quicksearch" value="1" />
<
input type="hidden" name="s" value="$session[sessionhash]/>
<
div><input type="text" class="bginput" name="query" size="25" tabindex="1001" /><input type="submit" class="button" value="$vbphrase[go]tabindex="1004" /></div>
</
td>
</
tr>
<
tr>
<
td class="vbmenu_option" title="nohilite">
<
label for="rb_nb_sp0"><input type="radio" name="showposts" value="0" id="rb_nb_sp0" tabindex="1002" checked="checked" />$vbphrase[show_threads]</label>
&
nbsp;
<
label for="rb_nb_sp1"><input type="radio" name="showposts" value="1" id="rb_nb_sp1" tabindex="1003" />$vbphrase[show_posts]</label>
</
td>
</
tr>
<
tr>
<
td class="vbmenu_option"><a href="search.php$session[sessionurl_q]accesskey="4" rel="nofollow">$vbphrase[advanced_search]</a></td>
</
tr>
<if 
condition="$show['member']"
<
tr>
<
td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getnew" accesskey="2">$vbphrase[new_posts_nav]:</a></td>
</
tr
<else /> 
<
tr>
<
td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily" accesskey="2">$vbphrase[todays_posts]:</a></td>
</
tr>
</if>
</
table>
</
form>
</
div>
<!-- / 
header quick search form -->
    </if>

    <if 
condition="$show['member']">
    <!-- 
user cp tools menu -->
    <
div class="vbmenu_popup" id="usercptools_menu" style="display:none">
        <
table cellpadding="4" cellspacing="1" border="0">
        
        <
tr><td class="thead">$vbphrase[quick_links]</td></tr>        
        <if 
condition="$vboptions['enablesearches']"><tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=getdaily">$vbphrase[todays_posts]</a></td></tr></if>
        <
tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]do=markread">$vbphrase[mark_forums_read]</a></td></tr>
        <
tr><td class="vbmenu_option"><a href="#" onclick="window.open('misc.php?$session[sessionurl]do=buddylist&amp;focus=1','buddylist','statusbar=no,menubar=no,toolbar=no,scrollbars=yes,resizable=yes,width=250,height=300'); return false;">$vbphrase[open_buddy_list]</a></td></tr>
                
        <
tr><td class="thead"><a href="usercp.php$session[sessionurl_q]">$vbphrase[user_control_panel]</a></td></tr>
        <if 
condition="$show['siglink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editsignature">$vbphrase[edit_signature]</a></td></tr></if>
        <!--<if 
condition="$show['avatarlink']"><tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editavatar">$vbphrase[edit_avatar]</a></td></tr></if>-->
        <
tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editprofile">$vbphrase[edit_profile]</a></td></tr>
        <
tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=editoptions">$vbphrase[edit_options]</a></td></tr>
        
        <
tr><td class="thead">$vbphrase[miscellaneous]</td></tr>
        <if 
condition="$show['pmstats']"><tr><td class="vbmenu_option"><a href="private.php$session[sessionurl_q]rel="nofollow">$vbphrase[private_messages]</a></td></tr></if>
        <
tr><td class="vbmenu_option"><a href="subscription.php$session[sessionurl_q]rel="nofollow">$vbphrase[subscribed_threads]</a></td></tr>
        <
tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$bbuserinfo[userid]">$vbphrase[my_profile]</a></td></tr>
        <if 
condition="$show['wollink']"><tr><td class="vbmenu_option"><a href="online.php$session[sessionurl_q]">$vbphrase[whos_online]</a></td></tr></if>
        
        </
table>
    </
div>
    <!-- / 
user cp tools menu -->
    </if>
<!-- / 
NAVBAR POPUP MENUS -->

<!-- 
PAGENAV POPUP -->

    <
div class="vbmenu_popup" id="pagenav_menu" style="display:none">
        <
table cellpadding="4" cellspacing="1" border="0">
        <
tr>
            <
td class="thead" nowrap="nowrap">$vbphrase[go_to_page]</td>
        </
tr>
        <
tr>
            <
td class="vbmenu_option" title="nohilite">
            <
form action="$vboptions[forumhome].php" method="get" onsubmit="return this.gotopage()" id="pagenav_form">
                <
input type="text" class="bginput" id="pagenav_itxt" style="font-size:11px" size="4" />
                <
input type="button" class="button" id="pagenav_ibtn" value="$vbphrase[go]/>
            </
form>
            </
td>
        </
tr>
        </
table>
    </
div>

<!-- / 
PAGENAV POPUP -->
</if>
<!-- / 
Navagation bar -->

<!-- 
content table -->
$spacer_open

$_phpinclude_output
$marquee 


I too can not find this code, www.guelphsfinest.com if u could let me know what i have to do here that woudl be great, Thank you.


Mark,

Skedoozy 02-12-2007 01:11 AM

Quote:

Originally Posted by djawir (Post 1143362)
The selected file type is not allowed. image/gif

Quote:

Originally Posted by Cove_new (Post 1159117)
This mod is rather nicem, but...
1) No gif support - i tried to edit options - no resault
2) Need a field with link, so it can be used with flash only

Quote:

Originally Posted by Thechipleaders (Post 1165484)
I keep getting the following error. Can anyone help? The error goes for any file type nust just a gif

The selected file type is not allowed. image/gif


Add the following to Vbulletin Options> Banner Rotator at the end of the Extensions line.
Code:

|image/gif

Quote:

Originally Posted by MediaMisfit (Post 1155704)
Anyways that we can make the banners linkable??? That would be cool.

Quote:

Originally Posted by marcsmith73 (Post 1174026)
When will be able to add URLs?

Yes, this would be nice. Urls for image links. Thanks!

thendershot 02-12-2007 02:19 PM

Quote:
Originally Posted by MediaMisfit
Anyways that we can make the banners linkable??? That would be cool.

Quote:
Originally Posted by marcsmith73
When will be able to add URLs?

Yes, this would be nice. Urls for image links. Thanks!



^^ yeah thats what i need the banner software for :)

MTVSlick 02-13-2007 02:35 AM

my keeps saying I cant use that image type, and I have tried all and set image types to most, but still same thing?

Mark,

MTVSlick 02-13-2007 03:02 AM

okay works now, thank you INSTALLED!

Mark,

Skedoozy 02-19-2007 11:34 PM

No support on this at all, eh? It seems to be randomly deleting banners now. So weird.

airborneCAL 02-20-2007 02:55 AM

It would definitely be great if you could add a field to enter the URL of the banner's source to make it clickable. Then, when clicked for it to open a NEW window.

projectego 02-28-2007 10:57 AM

[high]* projectego clicks install (again!) ;)[/high]

MotMann 03-01-2007 09:36 AM

Do that mod displayed different banner in header and footer?

I mean:

Banner "A" just in Header and Banner "b" just in footer?

brvheart 03-01-2007 02:38 PM

is there a way to make the banner clickable to the page for the banner you are showing?

Coach_Guru 03-01-2007 05:09 PM

Quote:

Future additions: Add URL for each banner individually, so when users click on it they will be redirected.
When this mod?

Thanks.

WarLion 03-03-2007 09:12 PM

Quote:

Originally Posted by brvheart (Post 1193368)
is there a way to make the banner clickable to the page for the banner you are showing?


actually i need that and i made it

find in product-rotator.xml

PHP Code:

CREATE TABLE `". TABLE_PREFIX ."banners` (
                      `
bidsmallint(20UNSIGNED NOT NULL auto_increment,
                      `
namevarchar(255NOT NULL default '',
                      `
widthvarchar(255NOT NULL default '',
                      `
heightvarchar(255NOT NULL default '',
                      `
altvarchar(255NOT NULL default '',
                      `
urlvarchar(255NOT NULL default '',
                      `
flashINT(1UNSIGNED NOT NULL default '0',
                      `
activeINT(1UNSIGNED NOT NULL default '0',
                      
PRIMARY KEY  (`bid`)
                    )
                
"); 

and remplace with this
PHP Code:

CREATE TABLE `". TABLE_PREFIX ."banners` (
                      `
bidsmallint(20UNSIGNED NOT NULL auto_increment,
                      `
namevarchar(255NOT NULL default '',
                      `
widthvarchar(255NOT NULL default '',
                      `
heightvarchar(255NOT NULL default '',
                      `
altvarchar(255NOT NULL default '',
                      `
urlvarchar(255NOT NULL default '',
                      `
linkvarchar(255NOT NULL default '',
                      `
flashINT(1UNSIGNED NOT NULL default '0',
                      `
activeINT(1UNSIGNED NOT NULL default '0',
                      
PRIMARY KEY  (`bid`)
                    )
                
"); 

then find
PHP Code:

} else {
        
$banner =     "<center><img src='" $vbulletin->options[bburl] . $defaultdir "/" $ban['name'] . "' alt='" $ban['alt'] . "' width='".$ban['width']."' height='".$ban['height']."' border='0'></center>";            
    } 

and remplace with
PHP Code:

} else {
        
$banner =     "<a href='".$ban['link']."'><img src='" $vbulletin->options[bburl] . $defaultdir "/" $ban['name'] . "' alt='" $ban['alt'] . "' width='".$ban['width']."' height='".$ban['height']."' border='0'></a>";            
    } 

now you need to add this about line 89
PHP Code:

<phrase name="setting_brotator_default_link_desc" date="1166036111" username="FileWarez" version="1.0b"><![CDATA[Defalt link]]></phrase

and
PHP Code:

<phrase name="setting_brotator_default_link_title" date="1166036111" username="FileWarez" version="1.0b"><![CDATA[Default link]]></phrase

save and import

now you need to edit the admincp/brotator.xml

on line 30 add this
PHP Code:

print_input_row('Link''link'$vbulletin->options['brotator_default_link']); 

find this
PHP Code:

if ($movefile) {
            
$db->query_write("INSERT INTO " TABLE_PREFIX "banners (bid, name, width, height, alt, flash, active) VALUES ('', '$fname', '$_POST[width]', '$_POST[height]', '$_POST[alt]', '$_POST[flash]', '$_POST[active]')");
            
print_cp_message($vbphrase['brotator_add_success'], "brotator.php?do=add""1");
        } else {
            
print_cp_message("There was an error while moving your file. Please retry.");
        } 

and remplace with this
PHP Code:

if ($movefile) {
            
$db->query_write("INSERT INTO " TABLE_PREFIX "banners (bid, name, width, height, link, alt, flash, active) VALUES ('', '$fname', '$_POST[width]', '$_POST[height]', '$_POST[link]', '$_POST[alt]', '$_POST[flash]', '$_POST[active]')");
            
print_cp_message($vbphrase['brotator_add_success'], "brotator.php?do=add""1");
        } else {
            
print_cp_message("There was an error while moving your file. Please retry.");
        } 

find this
PHP Code:

if (!empty($_POST['bid'])) {
            
$db->query("UPDATE " TABLE_PREFIX "banners SET 
                alt = '
$_POST[alt]',
                width = '
$_POST[width]',
                height = '
$_POST[height]',
                flash = '
$_POST[flash]'  
            WHERE bid = '
$_POST[bid]'");
            
print_cp_message($vbphrase['brotator_edit_desc_success'], "brotator.php?do=edit""1");
        } 

remplace with this
PHP Code:

if (!empty($_POST['bid'])) {
            
$db->query("UPDATE " TABLE_PREFIX "banners SET 
                alt = '
$_POST[alt]',
                width = '
$_POST[width]',
                height = '
$_POST[height]',
                link = '
$_POST[link]',
                flash = '
$_POST[flash]'  
            WHERE bid = '
$_POST[bid]'");
            
print_cp_message($vbphrase['brotator_edit_desc_success'], "brotator.php?do=edit""1");
        } 

find this
PHP Code:

                print_cells_row(array(
                    
"<center>".$img."</center>",
                    
"<form name='form1' method='post' action='brotator.php?do=edit'>
                    <input type='text' class='bginput' name='alt' value='
$banner[alt]' class='bginput' size='35'><br><br>
                    Width: <input type='text' class='bginput' name='width' value='
$banner[width]' class='bginput' size='5'> 
                    Height: <input type='text' class='bginput' name='height' value='
$banner[height]' class='bginput' size='5'><br><br>
                    Flash? <label for='flash"
.$banner[bid]."' class='smallfont'><input name='flash' id='flash".$banner[bid]."' type='checkbox' value='1' ".$checked."><strong>Yes</strong></label>
                    <input type='hidden' name='bid' value='
$banner[bid]'>
                    <input type='hidden' name='update' value='1'>
                    <input type='submit' name='Submit' value='  "
.$vbphrase['brotator_edit_update']."  ' class='button'>
                    </form>"
,
                    
$active 

and remplaze with this
PHP Code:

                print_cells_row(array(
                    
"<center>".$img."</center>",
                    
"<form name='form1' method='post' action='brotator.php?do=edit'>
                    <input type='text' class='bginput' name='alt' value='
$banner[alt]' class='bginput' size='35'><br>
                    Link : <input type='text' class='bginput' name='link' value='
$banner[link]' class='bginput' size='28'><br>
                    Width: <input type='text' class='bginput' name='width' value='
$banner[width]' class='bginput' size='5'> 
                    Height: <input type='text' class='bginput' name='height' value='
$banner[height]' class='bginput' size='5'><br><br>
                    Flash? <label for='flash"
.$banner[bid]."' class='smallfont'><input name='flash' id='flash".$banner[bid]."' type='checkbox' value='1' ".$checked."><strong>Yes</strong></label>
                    <input type='hidden' name='bid' value='
$banner[bid]'>
                    <input type='hidden' name='update' value='1'>
                    <input type='submit' name='Submit' value='  "
.$vbphrase['brotator_edit_update']."  ' class='button'>
                    </form>"
,
                    
$active 

save and overwrite

with this you can edit the link too
and thats all works for me on vb 3.6.4

michaelsilvia 03-04-2007 12:59 AM

How about allowing banners to be assigned to specific forums? I have been looking for something like this! For isntance, I have a baseball sub-forum and would like a baseball header, then a football header in my football forum.

Mike

nirav 03-04-2007 03:27 PM

i cant find
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
in my header template

WarLion 03-04-2007 04:12 PM

Quote:

Originally Posted by nirav (Post 1195517)
i cant find
<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />
in my header template

show me your header

brvheart 03-07-2007 06:38 PM

thank you much :) will do this in a bit for sure :) I almost say integrate it to the mod or maybe have both in the mod so that people can choose...since I have seen quite a few mention it ;)

thank you again, great mod!!

gsmlover4u 03-08-2007 04:56 AM

what is this error
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to access ./images/banners/iklkiu_468x60_01_01.gif/iklkiu_468x60_01_01.gif in /admincp/brotator.php on line 62

KHALIK 03-14-2007 11:02 PM

working nicely.

But

can you select different banners for "Specific" forums.

accessdeniedzzz 03-17-2007 05:37 AM

Nice work ;) i luv it

Spika 03-21-2007 09:17 AM

Quote:

Originally Posted by WarLion (Post 1195101)
actually i need that and i made it

find in product-rotator.xml

PHP Code:

CREATE TABLE `". TABLE_PREFIX ."banners` (
                      `
bidsmallint(20UNSIGNED NOT NULL auto_increment,
                      `
namevarchar(255NOT NULL default '',
                      `
widthvarchar(255NOT NULL default '',
                      `
heightvarchar(255NOT NULL default '',
                      `
altvarchar(255NOT NULL default '',
                      `
urlvarchar(255NOT NULL default '',
                      `
flashINT(1UNSIGNED NOT NULL default '0',
                      `
activeINT(1UNSIGNED NOT NULL default '0',
                      
PRIMARY KEY  (`bid`)
                    )
                
"); 

and remplace with this
PHP Code:

CREATE TABLE `". TABLE_PREFIX ."banners` (
                      `
bidsmallint(20UNSIGNED NOT NULL auto_increment,
                      `
namevarchar(255NOT NULL default '',
                      `
widthvarchar(255NOT NULL default '',
                      `
heightvarchar(255NOT NULL default '',
                      `
altvarchar(255NOT NULL default '',
                      `
urlvarchar(255NOT NULL default '',
                      `
linkvarchar(255NOT NULL default '',
                      `
flashINT(1UNSIGNED NOT NULL default '0',
                      `
activeINT(1UNSIGNED NOT NULL default '0',
                      
PRIMARY KEY  (`bid`)
                    )
                
"); 

then find
PHP Code:

} else {
        
$banner =     "<center><img src='" $vbulletin->options[bburl] . $defaultdir "/" $ban['name'] . "' alt='" $ban['alt'] . "' width='".$ban['width']."' height='".$ban['height']."' border='0'></center>";            
    } 

and remplace with
PHP Code:

} else {
        
$banner =     "<a href='".$ban['link']."'><img src='" $vbulletin->options[bburl] . $defaultdir "/" $ban['name'] . "' alt='" $ban['alt'] . "' width='".$ban['width']."' height='".$ban['height']."' border='0'></a>";            
    } 

now you need to add this about line 89
PHP Code:

<phrase name="setting_brotator_default_link_desc" date="1166036111" username="FileWarez" version="1.0b"><![CDATA[Defalt link]]></phrase

and
PHP Code:

<phrase name="setting_brotator_default_link_title" date="1166036111" username="FileWarez" version="1.0b"><![CDATA[Default link]]></phrase

save and import

now you need to edit the admincp/brotator.xml

on line 30 add this
PHP Code:

print_input_row('Link''link'$vbulletin->options['brotator_default_link']); 

find this
PHP Code:

if ($movefile) {
            
$db->query_write("INSERT INTO " TABLE_PREFIX "banners (bid, name, width, height, alt, flash, active) VALUES ('', '$fname', '$_POST[width]', '$_POST[height]', '$_POST[alt]', '$_POST[flash]', '$_POST[active]')");
            
print_cp_message($vbphrase['brotator_add_success'], "brotator.php?do=add""1");
        } else {
            
print_cp_message("There was an error while moving your file. Please retry.");
        } 

and remplace with this
PHP Code:

if ($movefile) {
            
$db->query_write("INSERT INTO " TABLE_PREFIX "banners (bid, name, width, height, link, alt, flash, active) VALUES ('', '$fname', '$_POST[width]', '$_POST[height]', '$_POST[link]', '$_POST[alt]', '$_POST[flash]', '$_POST[active]')");
            
print_cp_message($vbphrase['brotator_add_success'], "brotator.php?do=add""1");
        } else {
            
print_cp_message("There was an error while moving your file. Please retry.");
        } 

find this
PHP Code:

if (!empty($_POST['bid'])) {
            
$db->query("UPDATE " TABLE_PREFIX "banners SET 
                alt = '
$_POST[alt]',
                width = '
$_POST[width]',
                height = '
$_POST[height]',
                flash = '
$_POST[flash]'  
            WHERE bid = '
$_POST[bid]'");
            
print_cp_message($vbphrase['brotator_edit_desc_success'], "brotator.php?do=edit""1");
        } 

remplace with this
PHP Code:

if (!empty($_POST['bid'])) {
            
$db->query("UPDATE " TABLE_PREFIX "banners SET 
                alt = '
$_POST[alt]',
                width = '
$_POST[width]',
                height = '
$_POST[height]',
                link = '
$_POST[link]',
                flash = '
$_POST[flash]'  
            WHERE bid = '
$_POST[bid]'");
            
print_cp_message($vbphrase['brotator_edit_desc_success'], "brotator.php?do=edit""1");
        } 

find this
PHP Code:

                print_cells_row(array(
                    
"<center>".$img."</center>",
                    
"<form name='form1' method='post' action='brotator.php?do=edit'>
                    <input type='text' class='bginput' name='alt' value='
$banner[alt]' class='bginput' size='35'><br><br>
                    Width: <input type='text' class='bginput' name='width' value='
$banner[width]' class='bginput' size='5'> 
                    Height: <input type='text' class='bginput' name='height' value='
$banner[height]' class='bginput' size='5'><br><br>
                    Flash? <label for='flash"
.$banner[bid]."' class='smallfont'><input name='flash' id='flash".$banner[bid]."' type='checkbox' value='1' ".$checked."><strong>Yes</strong></label>
                    <input type='hidden' name='bid' value='
$banner[bid]'>
                    <input type='hidden' name='update' value='1'>
                    <input type='submit' name='Submit' value='  "
.$vbphrase['brotator_edit_update']."  ' class='button'>
                    </form>"
,
                    
$active 

and remplaze with this
PHP Code:

                print_cells_row(array(
                    
"<center>".$img."</center>",
                    
"<form name='form1' method='post' action='brotator.php?do=edit'>
                    <input type='text' class='bginput' name='alt' value='
$banner[alt]' class='bginput' size='35'><br>
                    Link : <input type='text' class='bginput' name='link' value='
$banner[link]' class='bginput' size='28'><br>
                    Width: <input type='text' class='bginput' name='width' value='
$banner[width]' class='bginput' size='5'> 
                    Height: <input type='text' class='bginput' name='height' value='
$banner[height]' class='bginput' size='5'><br><br>
                    Flash? <label for='flash"
.$banner[bid]."' class='smallfont'><input name='flash' id='flash".$banner[bid]."' type='checkbox' value='1' ".$checked."><strong>Yes</strong></label>
                    <input type='hidden' name='bid' value='
$banner[bid]'>
                    <input type='hidden' name='update' value='1'>
                    <input type='submit' name='Submit' value='  "
.$vbphrase['brotator_edit_update']."  ' class='button'>
                    </form>"
,
                    
$active 

save and overwrite

with this you can edit the link too
and thats all works for me on vb 3.6.4

Great work!
Works fine in 3.6.5!
My banners are now clickable, and I Have put I forumhome template below $navbar
but I have another question: How I can open the link in a new Window? Where I have put the code?

Thanks in advanced.

php4ever 03-21-2007 06:13 PM

I honestly dont see where you add banners. I've searched every single area of the admin cp and cant find a single place to upload images for the banners.

brvheart 03-21-2007 06:43 PM

Quote:

Originally Posted by WarLion (Post 1195101)
actually i need that and i made it

find in product-rotator.xml

PHP Code:

CREATE TABLE `". TABLE_PREFIX ."banners` (
                      `
bidsmallint(20UNSIGNED NOT NULL auto_increment,
                      `
namevarchar(255NOT NULL default '',
                      `
widthvarchar(255NOT NULL default '',
                      `
heightvarchar(255NOT NULL default '',
                      `
altvarchar(255NOT NULL default '',
                      `
urlvarchar(255NOT NULL default '',
                      `
flashINT(1UNSIGNED NOT NULL default '0',
                      `
activeINT(1UNSIGNED NOT NULL default '0',
                      
PRIMARY KEY  (`bid`)
                    )
                
"); 

and remplace with this
PHP Code:

CREATE TABLE `". TABLE_PREFIX ."banners` (
                      `
bidsmallint(20UNSIGNED NOT NULL auto_increment,
                      `
namevarchar(255NOT NULL default '',
                      `
widthvarchar(255NOT NULL default '',
                      `
heightvarchar(255NOT NULL default '',
                      `
altvarchar(255NOT NULL default '',
                      `
urlvarchar(255NOT NULL default '',
                      `
linkvarchar(255NOT NULL default '',
                      `
flashINT(1UNSIGNED NOT NULL default '0',
                      `
activeINT(1UNSIGNED NOT NULL default '0',
                      
PRIMARY KEY  (`bid`)
                    )
                
"); 

then find
PHP Code:

} else {
        
$banner =     "<center><img src='" $vbulletin->options[bburl] . $defaultdir "/" $ban['name'] . "' alt='" $ban['alt'] . "' width='".$ban['width']."' height='".$ban['height']."' border='0'></center>";            
    } 

and remplace with
PHP Code:

} else {
        
$banner =     "<a href='".$ban['link']."'><img src='" $vbulletin->options[bburl] . $defaultdir "/" $ban['name'] . "' alt='" $ban['alt'] . "' width='".$ban['width']."' height='".$ban['height']."' border='0'></a>";            
    } 

now you need to add this about line 89
PHP Code:

<phrase name="setting_brotator_default_link_desc" date="1166036111" username="FileWarez" version="1.0b"><![CDATA[Defalt link]]></phrase

and
PHP Code:

<phrase name="setting_brotator_default_link_title" date="1166036111" username="FileWarez" version="1.0b"><![CDATA[Default link]]></phrase

save and import

now you need to edit the admincp/brotator.xml

on line 30 add this
PHP Code:

print_input_row('Link''link'$vbulletin->options['brotator_default_link']); 

find this
PHP Code:

if ($movefile) {
            
$db->query_write("INSERT INTO " TABLE_PREFIX "banners (bid, name, width, height, alt, flash, active) VALUES ('', '$fname', '$_POST[width]', '$_POST[height]', '$_POST[alt]', '$_POST[flash]', '$_POST[active]')");
            
print_cp_message($vbphrase['brotator_add_success'], "brotator.php?do=add""1");
        } else {
            
print_cp_message("There was an error while moving your file. Please retry.");
        } 

and remplace with this
PHP Code:

if ($movefile) {
            
$db->query_write("INSERT INTO " TABLE_PREFIX "banners (bid, name, width, height, link, alt, flash, active) VALUES ('', '$fname', '$_POST[width]', '$_POST[height]', '$_POST[link]', '$_POST[alt]', '$_POST[flash]', '$_POST[active]')");
            
print_cp_message($vbphrase['brotator_add_success'], "brotator.php?do=add""1");
        } else {
            
print_cp_message("There was an error while moving your file. Please retry.");
        } 

find this
PHP Code:

if (!empty($_POST['bid'])) {
            
$db->query("UPDATE " TABLE_PREFIX "banners SET 
                alt = '
$_POST[alt]',
                width = '
$_POST[width]',
                height = '
$_POST[height]',
                flash = '
$_POST[flash]'  
            WHERE bid = '
$_POST[bid]'");
            
print_cp_message($vbphrase['brotator_edit_desc_success'], "brotator.php?do=edit""1");
        } 

remplace with this
PHP Code:

if (!empty($_POST['bid'])) {
            
$db->query("UPDATE " TABLE_PREFIX "banners SET 
                alt = '
$_POST[alt]',
                width = '
$_POST[width]',
                height = '
$_POST[height]',
                link = '
$_POST[link]',
                flash = '
$_POST[flash]'  
            WHERE bid = '
$_POST[bid]'");
            
print_cp_message($vbphrase['brotator_edit_desc_success'], "brotator.php?do=edit""1");
        } 

find this
PHP Code:

                print_cells_row(array(
                    
"<center>".$img."</center>",
                    
"<form name='form1' method='post' action='brotator.php?do=edit'>
                    <input type='text' class='bginput' name='alt' value='
$banner[alt]' class='bginput' size='35'><br><br>
                    Width: <input type='text' class='bginput' name='width' value='
$banner[width]' class='bginput' size='5'> 
                    Height: <input type='text' class='bginput' name='height' value='
$banner[height]' class='bginput' size='5'><br><br>
                    Flash? <label for='flash"
.$banner[bid]."' class='smallfont'><input name='flash' id='flash".$banner[bid]."' type='checkbox' value='1' ".$checked."><strong>Yes</strong></label>
                    <input type='hidden' name='bid' value='
$banner[bid]'>
                    <input type='hidden' name='update' value='1'>
                    <input type='submit' name='Submit' value='  "
.$vbphrase['brotator_edit_update']."  ' class='button'>
                    </form>"
,
                    
$active 

and remplaze with this
PHP Code:

                print_cells_row(array(
                    
"<center>".$img."</center>",
                    
"<form name='form1' method='post' action='brotator.php?do=edit'>
                    <input type='text' class='bginput' name='alt' value='
$banner[alt]' class='bginput' size='35'><br>
                    Link : <input type='text' class='bginput' name='link' value='
$banner[link]' class='bginput' size='28'><br>
                    Width: <input type='text' class='bginput' name='width' value='
$banner[width]' class='bginput' size='5'> 
                    Height: <input type='text' class='bginput' name='height' value='
$banner[height]' class='bginput' size='5'><br><br>
                    Flash? <label for='flash"
.$banner[bid]."' class='smallfont'><input name='flash' id='flash".$banner[bid]."' type='checkbox' value='1' ".$checked."><strong>Yes</strong></label>
                    <input type='hidden' name='bid' value='
$banner[bid]'>
                    <input type='hidden' name='update' value='1'>
                    <input type='submit' name='Submit' value='  "
.$vbphrase['brotator_edit_update']."  ' class='button'>
                    </form>"
,
                    
$active 

save and overwrite

with this you can edit the link too
and thats all works for me on vb 3.6.4

I did that and now I get a DB error :(

MySQL Error : Unknown column 'link' in 'field list'
Error Number : 1054

Spika 03-22-2007 11:17 AM

Quote:

Originally Posted by php4ever (Post 1208967)
I honestly dont see where you add banners. I've searched every single area of the admin cp and cant find a single place to upload images for the banners.

In AdminCP you should see in the left column "Banner Rotator" where you can add, edit or delete banners, If not refresh your browser.

mescalin 03-23-2007 03:15 PM

Its a perfect mod thank you..!

I would liketo see code rotating options (for bannerexchanges etc.) in the future releases..

andrefedalto 03-24-2007 01:22 PM

Quote:

Originally Posted by Spika (Post 1208651)
Great work!
Works fine in 3.6.5!
My banners are now clickable, and I Have put I forumhome template below $navbar
but I have another question: How I can open the link in a new Window? Where I have put the code?
Thanks in advanced.

If you did the changes WarLion pointed, find:
Code:

} else {
        $banner =    "<a href='".$ban['link']."'><img src='" . $vbulletin->options[bburl] . $defaultdir . "/" . $ban['name'] . "' alt='" . $ban['alt'] . "' width='".$ban['width']."' height='".$ban['height']."' border='0'></a>";           
    }

and replace to
Code:

} else {
        $banner =    "<a href='".$ban['link']."' target='_blank'><img src='" . $vbulletin->options[bburl] . $defaultdir . "/" . $ban['name'] . "' alt='" . $ban['alt'] . "' width='".$ban['width']."' height='".$ban['height']."' border='0'></a>";           
    }

Quote:

Originally Posted by php4ever (Post 1208967)
I honestly dont see where you add banners. I've searched every single area of the admin cp and cant find a single place to upload images for the banners.

Check attached image.

Quote:

Originally Posted by brvheart (Post 1208986)
I did that and now I get a DB error :(

MySQL Error : Unknown column 'link' in 'field list'
Error Number : 1054

After making the changes pointed by WarLion you have to reinstall the modification with the changed xml.

Quote:

Originally Posted by mescalin (Post 1210426)
Its a perfect mod thank you..!

I would liketo see code rotating options (for bannerexchanges etc.) in the future releases..

Can you explain more please?



And to WarLion: Thanks for helping out :)
Just one thing: there were no need to create a new field in database (link), since i already had set the 'url' field for future releases. But if it works fine, leave as it is. Thanks a lot for adding the feature :)

brvheart 03-24-2007 11:40 PM

I did reinstall....

mescalin 03-25-2007 11:17 PM

for example i want to rotate

Quote:

<center> <iframe src="http://www.anahtars.com/iframe.php?site_id=1xxxxx&bd=1" width="468" height="60" marginwidth="0" marginheight="0" hspace="0" vspace="0" frameborder="0" scrolling="no"><a href="http://www.anahtars.com/adclick.php" target="_blank"><img src="http://www.anahtars.com/adview.php?site_id=xxxx&bd=1" width="468" height="60" border="0"></a></iframe></center>
and maybe some other ads as swf, jpg..

many advertisers wants to place the code not just a banner.. it seems to be just a rotating images.. But it can rotate codes it can be fantastic..

andrefedalto 03-26-2007 09:31 PM

Quote:

Originally Posted by mescalin (Post 1212262)
for example i want to rotate



and maybe some other ads as swf, jpg..

many advertisers wants to place the code not just a banner.. it seems to be just a rotating images.. But it can rotate codes it can be fantastic..

Huh, i'm pretty sure there is already a modification for that. Just do a quick search at the mod-database and you should find something that suits your needs :)

Quote:

Originally Posted by brvheart (Post 1211442)
I did reinstall....

are you sure u reinstalled the modified version and not the original? I took a look at the code and if you did every step the way you should do, no errors would come up.

xrayeramy 03-27-2007 11:59 PM

Two questions before trying to install.
The URL code warlion did...is that in a new window? I still want them on my site and not redirected.
Can I have banners 1-10 rotating in the header and banners 11-20 rotating on the left? Do I need to add code somewhere to do that?

xrayeramy 03-28-2007 12:43 AM

I see my first question was answered in post #70.

ktutorials 04-01-2007 01:38 PM

when i import GIF it tells gif not supported.. when importing png it tells png not suported..

zahid1 04-05-2007 12:31 AM

i coudn't find this code in my header

<img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" />

this code is avaliable on on default skin cna u tell us for custom skin

zahid1 04-05-2007 09:08 PM

when i treid to uplaod banner it say The selected file type is not allowed. image/pjpeg

please help me

zahid1 04-05-2007 09:45 PM

Quote:

Originally Posted by Barakat (Post 1139064)
still have the same bug while trying to upload a banner with ext. jpeg or png .

The selected file type is not allowed.


chage extention to ''gif'' or ''jpg'' or what ever u have u justa change to ''swf'' then it will be fine

z0diac 04-06-2007 11:46 AM

I just started reading this thread - it seems like a good hack, but....

has ANYONE succesfully installed it yet? Seems like everyone's had nothing but problems judging from this thread, so before I install I just want to make sure it's running ok.


All times are GMT. The time now is 01:04 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.02361 seconds
  • Memory Usage 2,296KB
  • 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
  • (3)bbcode_code_printable
  • (41)bbcode_php_printable
  • (20)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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