Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-16-2015, 10:45 AM
X-or X-or is offline
 
Join Date: Nov 2005
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default random banner

Hi,

I wondered if someone had vb4 compatible code to display a random banner among a pool of banners. Some code has been posted for vb3 but it isn't vb4 compatible. Also I know there are various banner mods, but they are focused on advertising banners, not site banner.

Thanks
Reply With Quote
  #2  
Old 03-16-2015, 05:13 PM
squidsk's Avatar
squidsk squidsk is offline
 
Join Date: Nov 2010
Posts: 969
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm fairly sure that https://vborg.vbsupport.ru/showthread.php?t=188328 can be tweaked to do what you want.
Reply With Quote
Благодарность от:
TheLastSuperman
  #3  
Old 03-16-2015, 06:23 PM
X-or X-or is offline
 
Join Date: Nov 2005
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thx but I've already tried it, that's a huge and bloated mod for advertisement banners
so it's unrelated with what I'm looking for
Reply With Quote
  #4  
Old 03-17-2015, 03:09 PM
squidsk's Avatar
squidsk squidsk is offline
 
Join Date: Nov 2010
Posts: 969
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That have been what it was originally designed for, but as the creator noted it can be used for more or less anything. It doesn't have to be ad banners that are placed by the mod.

For example if you edit the header template and comment out <vb:comment></vb:comment> the code for the banner and replace it with a placeholder (i.e. %mybanner%). Then create however many banners you want that get assigned to that placeholder.

That's pretty simple to implement and should do for what your after.
Reply With Quote
  #5  
Old 03-17-2015, 04:05 PM
X-or X-or is offline
 
Join Date: Nov 2005
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am not interested in that mod thank you.

First it uses external content and is not even flagged as such. A quick look at the xml shows tons of calls for pagead2.googlesyndication.com

On top of that I'd have to deal with all the security issues going along huge mods.

12 lines of codes should be enough for a random banner, and you're asking me to install an huge Heath Robinson device to slice some eggs
Reply With Quote
  #6  
Old 03-17-2015, 07:20 PM
squidsk's Avatar
squidsk squidsk is offline
 
Join Date: Nov 2010
Posts: 969
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by X-or View Post
I am not interested in that mod thank you.

First it uses external content and is not even flagged as such. A quick look at the xml shows tons of calls for pagead2.googlesyndication.com
Maybe take a longer look at the code next time. Those links to external content are sample banners provided by the author so that users can have banners to start with. Could/should those be made internal, I'd argue yes, but that doesn't change the fact that removing those ads takes a tiny bit of time.

Quote:
On top of that I'd have to deal with all the security issues going along huge mods.
You'd also have to deal with that for any mod you install on your system, big or small, or even custom code you write yourself. So this statement is pointless to make.

Quote:
12 lines of codes should be enough for a random banner, and you're asking me to install an huge Heath Robinson device to slice some eggs
If it's so simple that it takes only 12 lines of code and you're so good you can handle security issues on your own, why are you wasting your time and ours asking for a solution when you apparently already know the solution. You've already wasted more time telling me why you can't use the mod than it would have taken you write those 12 hypothetical lines of code, especially if you're as good a coder as you claim to be.

The chances of someone creating a solution for you when a viable solution already exists is basically zero, unless you choose to pay someone to do it for you, in which case you're posting in the wrong section and should post in the paid request section.
Reply With Quote
Благодарность от:
blind-eddie
  #7  
Old 03-17-2015, 08:06 PM
X-or X-or is offline
 
Join Date: Nov 2005
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

you seem to be very angry dude

but if you're a coder yourself, I shouldn't have to explain you why you can't expect people to install an huge Heath Robinson device to slice some eggs

as for why I don't do it myself, it's because I'm not familiar with the vb framework
I have tried to get an image from a php file url but vb is making it difficult for people who are not familiar
Reply With Quote
  #8  
Old 03-18-2015, 01:24 PM
squidsk's Avatar
squidsk squidsk is offline
 
Join Date: Nov 2010
Posts: 969
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by X-or View Post
if you're a coder yourself, I shouldn't have to explain you why you can't expect people to install an huge Heath Robinson device to slice some eggs
If you're half the coder you claim to be then you should know that as a coder you aren't going to reinvent the wheel if there's a perfectly good wheel that already exists and can be used.

Quote:
as for why I don't do it myself, it's because I'm not familiar with the vb framework
This is pretty clear from the fact that you keep calling the mod a heath robinson machine but have no clue what would be required to actually code the functionality you are after, other than a vague reference to 12 lines of code. I can guarantee it would likely not be 12 lines of code, and code that small and short would require you to alter core files and would not allow you to make changes through admincp and even then the chances of being able to do it in 12 lines are remote.

Does it have features you aren't interested in using, almost certainly, but that's true with any piece of software you use that you don't code yourself. Did you write your own webserver software because apache is a "heath robinson machine" for doing a whole bunch of things as a webserver that you don't need it to do. Of course not. As I pointed out in my last response no one is going to code you something if a viable free alternative exists unless you pay them to do so, in which case post in the paid section.
Reply With Quote
  #9  
Old 03-18-2015, 03:15 PM
X-or X-or is offline
 
Join Date: Nov 2005
Posts: 201
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just did it with 8 lines of codes
thanks for your help man
Reply With Quote
  #10  
Old 03-18-2015, 06:54 PM
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
Senior Member
 
Join Date: Sep 2008
Location: North Carolina
Posts: 5,844
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd of went with this https://vborg.vbsupport.ru/showthread.php?t=188328 like Squid mentioned, by the way he knows his stuff and when replies is only trying to be helpful - he doesn't know why you like or dislike a mod nor should he care nor do I we simply offer suggestions and don't expect replies such as you've posted no one on here does.

If you did it in 8 lines of code we could have all been spared this thread, more so since you declined to share the few lines (see my sig, its ok to share lol). It's ok to say you don't understand how a mod works, we will help so next time just ask OR ask how to code something, we will help with that too .
Reply With Quote
Благодарность от:
blind-eddie
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 12:42 PM.


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.06540 seconds
  • Memory Usage 2,266KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (3)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete