vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   random banner (https://vborg.vbsupport.ru/showthread.php?t=317793)

X-or 03-16-2015 10:45 AM

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

squidsk 03-16-2015 05:13 PM

I'm fairly sure that https://vborg.vbsupport.ru/showthread.php?t=188328 can be tweaked to do what you want.

X-or 03-16-2015 06:23 PM

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

squidsk 03-17-2015 03:09 PM

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.

X-or 03-17-2015 04:05 PM

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

squidsk 03-17-2015 07:20 PM

Quote:

Originally Posted by X-or (Post 2540745)
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.

X-or 03-17-2015 08:06 PM

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

squidsk 03-18-2015 01:24 PM

Quote:

Originally Posted by X-or (Post 2540773)
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.

X-or 03-18-2015 03:15 PM

I just did it with 8 lines of codes
thanks for your help man

TheLastSuperman 03-18-2015 06:54 PM

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 :cool:.


All times are GMT. The time now is 05:56 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.01175 seconds
  • Memory Usage 1,740KB
  • 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
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (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