vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Add "Sponsored by" banners to your forum categories (https://vborg.vbsupport.ru/showthread.php?t=26818)

SirSteve 09-28-2001 02:21 PM

[QUOTE]Originally posted by FireFly
[B]MarkB:

PHP Code:

if ($forum['sponsorimg']) {
  eval(
"\$sponsoredby = \"".gettemplate('forumdisplay_sponsoredby')."\";");
} else {
  
$sponsoredby '';


Does this add the sponsor to threads? If so, can you tell me exactly where this goes?

Admin 09-28-2001 03:36 PM

SirSteve, yes, but you might want to change forumdisplay_sponsoredby to another template.
Add that code (with the new template) in showthread.php right after this:
PHP Code:

getforumrules($forum,$getperms); 

(almost end of file)
Should work. :)

SirSteve 09-28-2001 04:41 PM

Quote:

Originally posted by amykhar

and forumdisplay_sponsoredby was included in the list of required templates.

Finally, I added $sponsoredby to my forumdisplay template.
Everything is clean except the above. I have added the forumsdisplay_sponsoredby template and added $sponsoredby in the forumsdisplay template but nothing is showing up.

ForzaGrifo 09-28-2001 04:55 PM

Quote:

Originally posted by FireFly


ForzaGrifo:
Well, the first error I have NO idea what is all about.
That function is used on ALL admin pages, can't understand what it's producing an error here.

That's what I was saying. The previous calls to makeinputcode() have no problem. When it gets to the makeinputcode() that takes the sponsorname as parameter, error ocurrs. I think it might have got something to do with the fields in the forum table. I've added them in MyPhpAdmin and I'm pretty sure the fields are where they're suppose to be (i.e. after 'cancontainthreads'). It just makes no sense to me why the call to makeinputcode would fail.

Do you know what might have caused makeinputcode() to fail?

Quote:


About the second error:
Can you paste a line or two BEFORE line 365?
Maybe you deleted a ; or }, I dunno. :confused:

No I'm pretty sure I didn't make any syntax error in the code.

[high]* ForzaGrifo Just about to throw his hands up and surrender....
[/high]



:mad:

hondastyle 09-28-2001 07:34 PM

FireFly, you rock... this hack is sweeet !
The install was rather painless and it's extremely easy to use.

Screenshot attached for those wondering what it looks like..

Great job!

Fred 09-29-2001 06:29 AM

Ok - I set it up and works perfect. Thanks man.

TheComputerGuy 09-29-2001 11:43 AM

If you have the MSN hack, and the world time hack it will mess them up...on the index.php

So I thought I would tell ya, and make sure that you are using a backup copy

Admin 09-29-2001 12:08 PM

How will it mess them up, TheComputerGuy?
I don't use those hacks (URLs please? :)), but maybe I can fix it.

shadowbreed 09-29-2001 01:52 PM

I'm using the world time hack and have this one installed without any problems

TheComputerGuy 09-29-2001 09:30 PM

it wiped them out..as in they are no longer present ...I changed it back last night...I will be glad to show u the files...

DCTR 09-29-2001 11:49 PM

thankx m8

ForzaGrifo 09-30-2001 01:30 AM

Strange!!! I finally got it to work, but that's after I figured out that the culprit is in the copy and paste!!!!

When I copy and paste the code, it gives error when the script is run. But when I manually type the code in, no errors!!!

Does anyone know why it won't work when I copy the code from this thread and paste it into my text editor??

btw, Thx Firefly for helping!

SirSteve 09-30-2001 02:00 AM

Quote:

Originally posted by ForzaGrifo
Strange!!! I finally got it to work, but that's after I figured out that the culprit is in the copy and paste!!!!

When I copy and paste the code, it gives error when the script is run. But when I manually type the code in, no errors!!!

Does anyone know why it won't work when I copy the code from this thread and paste it into my text editor??

btw, Thx Firefly for helping!

You are probably capturing a space where one shouldn't belong...

hacker 09-30-2001 07:41 AM

Thanks Firefly for this wonderful hack. ;)

MarkB 09-30-2001 11:12 PM

Thanks for that extra snippet of code for showthread.php, Firefly :) As the kids like to say, you rock!:D

FreestylerNZ 10-02-2001 07:28 AM

Heya, I just registered so I can post a question.

How exactly do you have different sponsor ads for each Forum?

I did everything that amykhar listed, including adding $sponsoredby to my forumdisplay template.

Nothing shows up at all in the Forum that I added the banner to through the Admin system!

It would be really great if someone could write more detailed instructions on having unique banners in each forum.

Stephan Whelan 10-03-2001 07:10 AM

Firefly,

I saw this hack a while ago and wanted to install it - however i've only just got round to doing it - and I just wanted to say THANKS! for a great hack...

Rcooper 10-06-2001 03:00 AM

Great hack! One Question. . .

i want to link to pictures on another server. I figure i would have to edit this part of the template
Code:

<img src="{imagesfolder}/$forum[sponsorimg]" border="0" alt="Proudly sponsored by $forum[sponsorname]">
but i am not sure exactl what to do. I understant that I will have to type the full URL to evey sponsor i add. that is ok with me!

Thank for any help and thanks for a GREAT hack!

Ryan C.

YourHostSucks 10-06-2001 03:06 AM

I would just replace ( src="images/$forum[sponsorimg]" )

With (src="http://www.blahblah.com/blah/images/$forum[sponsorimg]" )
then you store the images in that folder on that site.. and
when you ad the sponsor just write the picture name..

Seems like the best way to me..

Rcooper 10-06-2001 03:11 AM

YourHostSucks,
only problem is i want to use comission junction to sponsor the forums. This is the code they give you. . .

<a href="http://www.qksrv.net/click-904372-1614906" target="_top" >
<img src="http://www.qksrv.net/image-904372-1614906" width="120" height="60" alt="" border="0"></a>


Any ideas?

BTY Damn your quick! :)

YourHostSucks 10-06-2001 03:17 AM

So they are going to be your only sponsor?


PHP Code:

<img src="http://www.qksrv.net/$forum[sponsorimg]border="0" alt="Proudly sponsored by $forum[sponsorname]"

Then in your admin control panel add them and use image-904372-1614906 as the image..
and
http://www.qksrv.net/click-904372-1614906 as the sponsor url.... and Their name..

Rcooper 10-06-2001 03:22 AM

No not my only one just one to fill in till i get some others. ..

YourHostSucks 10-06-2001 03:27 AM

I edit my other post.. but 120x60 is pretty large to have..
maybe you should use a different image..

Keep the default code for the hack and make your own image.. just link to what they tell you..

EX: Do not change any code.. Just make a new image and upload it to the correct folder..

then link to http://www.qksrv.net/click-904372-1614906

snyx 10-06-2001 04:40 AM

great hack man, I wanted to know this from the get go
only issue the images were left align, no biggie, ez fix.

Rcooper 10-06-2001 01:12 PM

[QUOTE]Originally posted by snyx
great hack man, I wanted to know this from the get go
only issue the images were left align, no biggie, ez fix.

Admin 10-06-2001 01:14 PM

rcooper, use this as your template:
Code:

<img src="$forum[sponsorimg]" border="0" alt="Proudly sponsored by $forum[sponsorname]">
And now just enter the full url to the image, e.g "http://www.qksrv.net/image-904372-1614906".

YourHostSucks 10-06-2001 02:50 PM

Doh! Man I was so sleepy (went to bed after was done with this thread)

I was not thinking clear.. :)

But FireFly is wise and has told you the smart thing to do.

Althou I would still suggest you make your own image
and do not change the code... :)
You will see what I mean if you put that 120x60 image
in the sponsor by section.. (hehe)

Rcooper 10-06-2001 08:17 PM

FireFly yo Rock! Thanks for the great hack and help!

rcooper

YourHostSucks 10-11-2001 01:27 AM

Just wan't to make sure you know how much I love this feature! :)

THANK YOU! :D

It is working very well!

Hooper 10-18-2001 08:26 PM

The hack is wonderful. Just what I wanted. But soon after I installed this my search quit working. I'm not sure if it is the hack or not. Most likely not. However, what could cause my search to stop functioning? When you try a search it comes back to no matches found. If you type less than the required letters for search it does the same thing. It will not redirect or anything. Just no matches found.

Any suggestions?

amykhar 10-18-2001 09:18 PM

When I put something in phpinclude, my buddy list quit working. Have you put anything in there?

(grasping at straws)

Amy

Hooper 10-18-2001 10:04 PM

Oh god... I've PhP included my ass off! .............................:mad:

This shouldn't keep anything from working. I hope a developer responds to this... HELP.................................

Freddie Bingham 10-18-2001 10:11 PM

If you over write a vB variable with something in phpinclude than you can cause all sorts of problems.

My advice? Clean out phpinclude and see if your search works.

Hooper 10-18-2001 10:24 PM

ok. I'll work on it. Thanks.

Freddie Bingham 10-18-2001 10:28 PM

Look in the search templates for variables (start with $) and see if you have any matching variables in your phpinclude template, i.e. like $query

Hooper 10-18-2001 10:39 PM

I had to remove the includes. It works now. But this really stinks. My files that I have included were important to my site.

Are there any work arounds?

Shoot freddie. There are quite a few queries in my php includes.

Freddie Bingham 10-18-2001 10:44 PM

The work arounds are not to use variables of the same name that vB uses.

You can have all the queries you want, just don't name them '$query' - that one would kill the search.

Hooper 10-18-2001 10:52 PM

Thanks Freddie.

amykhar 10-23-2001 10:53 AM

I found a new use for this hack :D

I added one extra field to the database, and now have forum-specific web rings at the bottom of my topical conversation forums. This hack is highly adaptive :)

Example: Scroll down and look right above the footer.

http://www.eaforums.com/forumdisplay.php?s=&forumid=27

Amy

Hooper 10-24-2001 01:09 AM

Amy your a genious. Very nice. Doesn't shock me in the least that you could figure this out.

Very Nice.


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