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 08-04-2003, 04:35 PM
Anat Anat is offline
 
Join Date: Jun 2002
Location: Israel
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Different Ads on different forums + showing recent threads on main page of website

Hi, I'm looking for a couple of hacks - I have tried searching these forums but couldn't find them.

1. I wish my forums to display different ads for different forums - like what is done at sitepoint. I don't know if this is done with a hack or just playing with different templates.

2. I also wish to display a dynamic box on the main page of my website (not the main page of the forums) with the 5 most recent threads in the forums. The main page is a PHP page.

Any help would be appreciated!!
Reply With Quote
  #2  
Old 08-04-2003, 05:30 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1. Modify the forumhome_forumbit_level1_nopost, and add a
PHP Code:
<td style="text-align: right;">$advertisement</td
and add some code to your index.php, like
PHP Code:
if ($forum['forumid']==1)
{
  
$advertisement="<img src=\"images/advertisement01.jpg\" />";

right before
PHP Code:
        eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";"); 
2. Have you tried searching? I've found https://vborg.vbsupport.ru/showthrea...t=%2Arecen%2A, and although it scrolls the threads, you could just remove the <marquee> tags.
Reply With Quote
  #3  
Old 08-05-2003, 04:16 AM
Anat Anat is offline
 
Join Date: Jun 2002
Location: Israel
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you so much! I will try out both and let you know how it worked. Much appreciated!
Reply With Quote
  #4  
Old 08-05-2003, 08:11 AM
Anat Anat is offline
 
Join Date: Jun 2002
Location: Israel
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well I'm having some problems implementing the marquee hack - posted about it in the thread. Looks like it's an old thread - I hope someone will be around to help. I guess I'm going to try the advertisements now
Reply With Quote
  #5  
Old 08-05-2003, 09:06 AM
Anat Anat is offline
 
Join Date: Jun 2002
Location: Israel
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Gary - question about the PHP code for the different ads.

I need the images to be linked to the advertisers's website.

I'm not sure how to change the PHP code - would that be the right syntax -

if ($forum['forumid']==1)
{
$advertisement="<a href="http://adsite.com" target="_blank'><img src=\"images/advertisement01.jpg\" /></a>";
}

Not sure where I put the </a> at the end....
Reply With Quote
  #6  
Old 08-05-2003, 01:11 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 06:06 AM Anat said this in Post #5
Gary - question about the PHP code for the different ads.

I need the images to be linked to the advertisers's website.

I'm not sure how to change the PHP code - would that be the right syntax -


if ($forum['forumid']==1)
{
$advertisement="<a href="http://adsite.com" target="_blank'><img src=\"images/advertisement01.jpg\" /></a>";
}

Not sure where I put the </a> at the end....
This is what you should have:

PHP Code:
if ($forum['forumid']==1

  
$advertisement="<a href=\"http://adsite.com\" target=\"_blank\"><img src=\"images/advertisement01.jpg\" /></a>"

Reply With Quote
  #7  
Old 08-05-2003, 01:58 PM
Anat Anat is offline
 
Join Date: Jun 2002
Location: Israel
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Phew - glad I asked. No way would I have guessed that!

Thanks again Gary!!!
Reply With Quote
  #8  
Old 08-05-2003, 02:46 PM
Gary King's Avatar
Gary King Gary King is offline
 
Join Date: Jan 2002
Posts: 2,046
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad I could help!
Reply With Quote
  #9  
Old 08-06-2003, 06:47 PM
Anat Anat is offline
 
Join Date: Jun 2002
Location: Israel
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmmm.... Gary for some reason this isn't working for me. I did everything you said - and no ad show up...

This is what the code at index.php looks like -


if ($forum['forumid']==1)
{
$advertisement="<img src=\"/forums/images_new/ad01.gif\" />";
}

if ($forum['forumid']==2)
{
$advertisement="<img src=\"/forums/images_new/ad01.gif\" />";
}

if ($forum['forumid']==3)
{
$advertisement="<img src=\"/forums/images_new/ad11.gif\" />";
}

if ($forum['forumid']==4)
{
$advertisement="<img src=\"/forums/images_new/ad11.gif\" />";
}

eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$te mpext")."\";");


---------------------------------------------------------------

I also changed the forumhome_forumbit_level1_nopost template exactly like you told me.

Nothing shows up - not even a red X (of course I have the images uploaded at that URL).

------------------------------------------------------------

In case you wish to see this for yourself you need to login as -

username - addelle password - review

As all of the above is only in my new design (I have changed the template in the new design only) and that user is set to see the new design (no posting or any other privelages )
Reply With Quote
  #10  
Old 08-06-2003, 06:55 PM
Anat Anat is offline
 
Join Date: Jun 2002
Location: Israel
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BTW - not sure how this fits in but I would really like the ads to show right beneath the header of my site (i.e. right before the forums display). I tried putting the $advertisement as part of the header but it doesn't work...
Reply With Quote
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 11:58 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.05274 seconds
  • Memory Usage 2,279KB
  • Queries Executed 14 (?)
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
  • (4)bbcode_php
  • (1)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
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete