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)

SpaceStar 08-22-2007 02:46 PM

Quote:

Originally Posted by i.s.s.w (Post 1323099)
Nice :)

while uploading a simple banner in ext. of jpg or png it gives this

The selected file type is not allowed.


Check post #47

SpaceStar 08-22-2007 02:48 PM

Quote:

Originally Posted by majorvbuser (Post 1323145)
Anybody know of a banner rotation script which allows you to actually add a URL to the banner? I don't understand what purpose a banner script is that doesn't make the banners clickable??


check post #57!

I've modified these files and it's working great for me at www.pegham.com - you can make your own modifications or use these files I've modified:

scenes 08-22-2007 05:17 PM

I'm new to all of this!
VB is a big application, probably too big for me.
Anyway...
...I would like to use this Banner utility.

"- Upload all the files contained in the "upload" folder inside the zip to your forum root directory."

...I don't have any ZIP file or folder in my Forum directory...
Also, I don't have any admincp, because I changed the name. Is it the same?

"- Install product-brotator."

The file is "product-brotator.xml" ?
Where do I have to upload it ?
How do I have to install it ?

Thanks from any help in the world!
I just finished to change the look of my forum site, I would like to finish this to make it run.

I understand these are silly questions...
Thanks for any help

smp3000 08-22-2007 07:41 PM

Scenes, to answer your questions:

I'm not sure what you mean by the fact that you changed the name of admincp, but it's the admin control panel (clicking admin on the lower right-hand corner of your forum page).

Once in, go to "Plugins & Products" and go to "Manage Products". Then in the right page go to Add/Import plugin and this is where you browse to the xml file to upload the plugin.

Download the zip file underneath the "Download Now" section of the first post.

scenes 08-22-2007 07:53 PM

:( Arghhhhh!

Thanks for reply !

I just discovered how to upload the plug-in.
This VB is incredible... lot of parameters everywhere!

Anyway... It's absolutly fantastic!

Ok, I was able to install it and I made a test uploading a jpg banner.
Of course, as I read in previously posts, I had an error about "image/pjpg" kind of images.
I fixed.

Now on the page is showing the banner: wow ! Hurrah !

But...

There's a way to put the banner aligned to the LEFT ?
It seems that the CENTER is locked !
I tryed to see at the php file... But I didn't understand where is this option...
I added a forced div alignment in the common templates manager, but doesn't work...

Where do I have to check ? :confused:

Thanks

scenes 08-23-2007 10:00 AM

:) This add-on is nice and works.
Not easy to install at first time, but then it gives good results.

Only :

1) I don't succeded in changing the alignment for banners. They always look in the middle of their space.

2) I'm using banners of 468x60 pixels. Very strange, if I go with the mouse on the left and on the right (out of the banner) the link remains active. I have a doubt, somewhere in the php gives to banners fixed dimensions? Probably is also the matter that it dosn't move on the left...

3) Is it possible to add the chance to know how many time the banners are displayed?

4) Is it possible to add the chance to know how many times banners are clicked?

I don't know php, just a little to change minimum customization if they are in html.
Banners inside PHP-Nuke works great.
Is it possible to use the same modules inside VB ?

:D Too many questions????

BTW - here's my forum site:
http://www.zag.it/forums

stevebullman 08-23-2007 02:58 PM

ive uploaded this and there doesnt seem to be an option anywhere for uploading banners. am i missing something? the edit option shown in the first screenshot at the top of the page isnt there.

WarLion 08-26-2007 06:12 AM

Hi how
wow long time this mod is not updated ok for the intersted i been workin a little bit in this hack the last time was for the mod for url and this time is for choose the target opcion i meant _self, _blank _top etc.

remenber you need to have the last mod with the link opction post 57 and then you can do this one.

for this you need to edit two files one is Product-brotator.xml and brotator.php

lets start with product-brotator.xml
you need to find this line
Code:

`link` varchar(255) NOT NULL default '',
and add below
Code:

`target` varchar(20) NOT NULL default '',
find
Code:

$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 remplase with
Code:

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

and save it

you can upload the xml with admincp- >products & plugins-> add / import product-> and allow the overwrite if you already have it

now lets start with brotatos.php

find
Code:

$defaultdir = str_replace(".", "", $vbulletin->options['brotator_default_dir']);
add below
Code:

$target_options = array(
                        _self => _self,
                        _blank => _blank,
                        _parent => _parent,
                        _top => _top,
                        );

find
Code:

print_input_row('Link', 'link', $vbulletin->options['brotator_default_link']);
add below
Code:

print_select_row('Target', 'target', $target_options, _self);
find
Code:

$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[target]', '$_POST[alt]', '$_POST[flash]', '$_POST[active]')");
                        print_cp_message($vbphrase['brotator_add_success'], "brotator.php?do=add", "1");

and remplace width
Code:

$db->query_write("INSERT INTO " . TABLE_PREFIX . "banners (bid, name, width, height, link, target, alt, flash, active) VALUES ('', '$fname', '$_POST[width]', '$_POST[height]', '$_POST[link]', '$_POST[target]', '$_POST[alt]', '$_POST[flash]', '$_POST[active]')");
                        print_cp_message($vbphrase['brotator_add_success'], "brotator.php?do=add", "1");

find this
Code:

link = '$_POST[link]',
add below
Code:

target = '$_POST[target]',
find
Code:

Height: <input type='text' class='bginput' name='height' value='$banner[height]' class='bginput' size='5'><br><br>
add below
Code:

Target :<select name='target' onChange='MM_jumpMenu('parent',this,0)' class='bginput'>
                                            <option>'$banner[target]'</option>
                                          <option>_self</option>
                                            <option>_blank</option>
                                            <option>_parent</option>
                                            <option>_top</option>
                                          </select>&nbsp;

save it and upload to your server, if everithis go rigth you will have someting like this one

Code:

http://img142.imageshack.us/img142/488/addfc6.png
http://img142.imageshack.us/img142/4914/edithj1.png

all credits go to andrefedalto

i don put the files cuz al are in spanish lol i will try to upload after i translate back.


and i have a new idea i will make to choose the alig give me more ideas do you like <div> or <table>, <center> what do you like more?
i will made the modifficaccion and a complite new product to upload

AquilaEagle 08-26-2007 01:41 PM

DAMN THIS THING. I installed this to the letter, and had awful problems with it. Got it working almost, and then found that I cannot get into my adminCP - well I can get into my adminCP but not the vBulletin Options part at the top - just getting a blank screen. All other parts of the adminCP work. I have done nothing else but install, and now un-installed this mod. Now the un-install is done, template changed back etc, this adminCP error remains. Can anyone help?

Attachment 69075

WarLion 08-26-2007 02:25 PM

Quote:

Originally Posted by AquilaEagle (Post 1326018)
DAMN THIS THING. I installed this to the letter, and had awful problems with it. Got it working almost, and then found that I cannot get into my adminCP - well I can get into my adminCP but not the vBulletin Options part at the top - just getting a blank screen. All other parts of the adminCP work. I have done nothing else but install, and now un-installed this mod. Now the un-install is done, template changed back etc, this adminCP error remains. Can anyone help?

Attachment 69075

when you say i installed to the letter what do yo mean, what do you install?
and wich version of VB do you have?


All times are GMT. The time now is 12:49 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.01374 seconds
  • Memory Usage 1,767KB
  • 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
  • (15)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)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