Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 16 Mar 2015, 11:45
X-or X-or is offline
 
Join Date: Nov 2005
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 16 Mar 2015, 18:13
squidsk's Avatar
squidsk squidsk is offline
 
Join Date: Nov 2010
I'm fairly sure that http://www.vbulletin.org/forum/showthread.php?t=188328 can be tweaked to do what you want.
Reply With Quote
  #3  
Old 16 Mar 2015, 19:23
X-or X-or is offline
 
Join Date: Nov 2005
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

Last edited by X-or; 17 Mar 2015 at 11:39.
Reply With Quote
  #4  
Old 17 Mar 2015, 16:09
squidsk's Avatar
squidsk squidsk is offline
 
Join Date: Nov 2010
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 17 Mar 2015, 17:05
X-or X-or is offline
 
Join Date: Nov 2005
Thumbs down

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 17 Mar 2015, 20:20
squidsk's Avatar
squidsk squidsk is offline
 
Join Date: Nov 2010
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.

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.

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.

Last edited by squidsk; 18 Mar 2015 at 14:00.
Reply With Quote
  #7  
Old 17 Mar 2015, 21:06
X-or X-or is offline
 
Join Date: Nov 2005
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 18 Mar 2015, 14:24
squidsk's Avatar
squidsk squidsk is offline
 
Join Date: Nov 2010
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.

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 18 Mar 2015, 16:15
X-or X-or is offline
 
Join Date: Nov 2005
I just did it with 8 lines of codes
thanks for your help man
Reply With Quote
  #10  
Old 18 Mar 2015, 19:54
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
 
Join Date: Sep 2008
Real name: Michael Miller Jr
I'd of went with this http://www.vbulletin.org/forum/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 .
__________________
Daddy Does Dios and Figs!
https://www.linkedin.com/in/thelastsuperman

Search - Use the search feature to find similar issues/answers.
Information - Include screenshots, copy/pasted error codes, url etc.
Fixed - Please return to your thread/post and let us know how it was fixed!
Thanks - For participating! Click the "Like" on a post if someone helped you!

Last edited by TheLastSuperman; 18 Mar 2015 at 20:01.
Reply With Quote
  #11  
Old 18 Mar 2015, 20:29
X-or X-or is offline
 
Join Date: Nov 2005
^i don't mind to share

I've just added a random_banner.php file and point the banner image source to it.

tbh I don't know if he's really trying to help when I posted in op that I didn't want of these ad banners mods, yet he pointed me to the very thread where I posted earlier it was overly complicated for the simple thing I needed. maybe it's just my imagination but it seemed like baiting.

Last edited by X-or; 19 Mar 2015 at 21:00.
Reply With Quote
  #12  
Old 18 Mar 2015, 21:54
squidsk's Avatar
squidsk squidsk is offline
 
Join Date: Nov 2010
Originally Posted by X-or View Post
tbh I don't know if he's really trying to help when I posted in op that I didn't want of these ad banners mods, yet he pointed me to the very thread where I posted earlier it was overly complicated for the simple thing I needed. maybe it's just my imagination but it seemed like baiting.
Your op just said you didn't want a mod focused on advertising banners as opposed to site banners. In reality a banner is a banner, the difference between the two types is that the ad banner directs you to some other site or product or service while the site banner does not (i.e. an ad banner is surrounded by a url and site banner is not). So any mod that can be used for advertising banners can also be used for site banners and visa versa. I knew about the rotating banner mod because a site I administer uses it and recall the mod creator saying it could be used for any purpose, he in fact mentioned posting random quotes from famous people using his mod. Now looking back for that post I realize that was in response to you.

I don't regularly read the threads of all mods on this site so I had no idea you'd posted in there, nor would I necessarily associate a post in one section of site with a response to a thread in another. Also just because you found the mod difficult to use didn't mean it wouldn't work, which is why I explained how you would go about using the mod to meet your needs.

I will also point out that your code, unless I'm missing something in your code, which I could very well be, still needs to be tied into your forum for it to display that file as your top banner. You'd also need to edit that code, as opposed to working with a ui, to make changes to the number of links for any banners you want to have displayed. So that code might be shorter but it is more difficult to work with long term. If that code does what you want then that's great because your problem is solved.
Reply With Quote
  #13  
Old 18 Mar 2015, 22:40
X-or X-or is offline
 
Join Date: Nov 2005
^ok then sorry dude it was just a misunderstanding on my side

about the code it also requires an edit of the header template of course, where the default titleimage is located

Last edited by X-or; 19 Mar 2015 at 21:00.
Reply With Quote
  #14  
Old 18 Mar 2015, 22:53
TheLastSuperman's Avatar
TheLastSuperman TheLastSuperman is offline
 
Join Date: Sep 2008
Real name: Michael Miller Jr
See simple misunderstanding was all, I hoped it might be that . Remember ladies and gents, we chat on a forum but one thing we simply can't convey too well is "tone" (unless you overuse smilies like me trying too do just that lol) so sometimes we tend to read too far into things OR take them the wrong way heck I'm guilty of that too sometimes just ask my wife!
__________________
Daddy Does Dios and Figs!
https://www.linkedin.com/in/thelastsuperman

Search - Use the search feature to find similar issues/answers.
Information - Include screenshots, copy/pasted error codes, url etc.
Fixed - Please return to your thread/post and let us know how it was fixed!
Thanks - For participating! Click the "Like" on a post if someone helped you!

Last edited by TheLastSuperman; 19 Mar 2015 at 02:27. Reason: thought --> hoped
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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


New To Site? Need Help?

All times are GMT. The time now is 15:53.

Layout Options | Width: Wide Color: