vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.7 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=229)
-   -   Forum Home Enhancements - Upcoming Events at top of forumhome (https://vborg.vbsupport.ru/showthread.php?t=198404)

dismas 12-08-2008 10:00 PM

Upcoming Events at top of forumhome
 
If your site uses the calendar feature, you may want to better publicize events on the forumhome. The default location of the "What's going on?" box is all the way at the bottom of forumhome and is pretty easy to never even see.

So, if you'd like to put another copy of the upcoming events and the day's birthdays at the top of the forums:

First, find your FORUMHOME template.

Go to:
AdminCP > Styles & Templates > Search in Templates > input FORUMHOME & search titles only > edit

Find:
Code:

<!-- / guest welcome message -->
<br />
</if>

Just below that add:
Code:

<!-- what's going on box -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">


<if condition="$show['birthdays']">
<!-- today's birthdays -->
<tbody>
        <tr>
                <td class="thead" colspan="2">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_birthdays')"><img id="collapseimg_forumhome_birthdays" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_birthdays].gif" alt="" border="0" /></a>
                        $vbphrase[todays_birthdays]
                </td>
        </tr>
</tbody>
<tbody id="collapseobj_forumhome_birthdays" style="$vbcollapse[collapseobj_forumhome_birthdays]">
        <tr>
                <td class="alt2"><a href="calendar.php?$session[sessionurl]do=getday&amp;day=$today&amp;sb=1"><img src="$stylevar[imgdir_misc]/birthday.gif" alt="$vbphrase[view_birthdays]" border="0" /></a></td>
                <td class="alt1" width="100%"><div class="smallfont">$birthdays</div></td>
        </tr>
</tbody>
<!-- end today's birthdays -->
</if>
<if condition="$show['upcomingevents']">
<tbody>
        <tr>
                <td class="thead" colspan="2">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_events')"><img id="collapseimg_forumhome_events" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_events].gif" alt="" border="0" /></a>
                        <if condition="$show['todaysevents']">$vbphrase[todays_events]<else /><phrase 1="$vboptions[showevents]">$vbphrase[upcoming_events_for_the_next_x_days]</phrase></if>
                </td>
        </tr>
</tbody>
<tbody id="collapseobj_forumhome_events" style="$vbcollapse[collapseobj_forumhome_events]">
        <tr>
                <td class="alt2"><a href="calendar.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/calendar.gif" alt="$vbphrase[calendar]" border="0" /></a></td>
                <td class="alt1" width="100%"><div class="smallfont">$upcomingevents</div></td>
        </tr>
</tbody>
</if>
</table>
<!-- end what's going on box -->
<br />




If want just the upcoming events without the birthdays, then use this:
Code:

<!-- what's going on box -->
<if condition="$show['upcomingevents']">
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">

<tbody>
        <tr>
                <td class="thead" colspan="2">
                        <a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_events')"><img id="collapseimg_forumhome_events" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_events].gif" alt="" border="0" /></a>
                        <if condition="$show['todaysevents']">$vbphrase[todays_events]<else /><phrase 1="$vboptions[showevents]">$vbphrase[upcoming_events_for_the_next_x_days]</phrase></if>
                </td>
        </tr>
</tbody>
<tbody id="collapseobj_forumhome_events" style="$vbcollapse[collapseobj_forumhome_events]">
        <tr>
                <td class="alt2"><a href="calendar.php$session[sessionurl_q]"><img src="$stylevar[imgdir_misc]/calendar.gif" alt="$vbphrase[calendar]" border="0" /></a></td>
                <td class="alt1" width="100%"><div class="smallfont">$upcomingevents</div></td>
        </tr>
</tbody>
</table>
</if>
<!-- end what's going on box -->
<br />




In both of these examples, I've removed the header that says "What's Going On?". If you'd rather have that, then do this:

After:
Code:

<!-- what's going on box -->
Put:
Code:

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
        <tr>
                <td class="tcat" colspan="2">$vbphrase[whats_going_on]</td>
        </tr>
</thead>

Save the template and you're done.

Preech 12-09-2008 11:09 AM

Would this be to hard to implement into a module or a place it somewhere on vbadvanced.

Leo Brazil 12-09-2008 03:26 PM

Any screenshots or demo ?

dismas 12-10-2008 03:03 AM

Screenshot added.

joh 12-10-2008 02:23 PM

Thank you very much for the instructions.
I have one question, how do i remove the space on the top and bottom of the cell.
I have attached a screen shot.

cindy helmond 12-10-2008 03:19 PM

dont see anything on the top of my forum :confused:

dismas 12-11-2008 05:50 AM

Quote:

Originally Posted by joh (Post 1682419)
Thank you very much for the instructions.
I have one question, how do i remove the space on the top and bottom of the cell.
I have attached a screen shot.

You have a space at the top and bottom of every table on the page. The space below the WGO info seems to be a bit larger than the rest though. Try taking out the final line break tag, <br />

Leo Brazil 12-11-2008 09:55 AM

Great Job, installed.

Michigan Morels 12-20-2008 07:31 AM

Thanks. It worked!

limmengwei 12-20-2008 02:28 PM

Hi,
Very nice mod, thanks!

How do I modify the box title "What's Going On" to something else? I tried to change but could not get it to work.

Thanks!

dismas 12-26-2008 06:40 AM

If you'd like to just change this one instance, you can just change the text here:

Code:

                <td class="tcat" colspan="2">$vbphrase[whats_going_on]</td>
If you change the "whats_going_on" phrase, it would be changed throughout your fourms.

TimberFloorAu 02-12-2009 09:27 PM

How would we display this for other calendars.

Lets say calendar id is 2

Thanks

dismas 02-17-2009 03:04 AM

Calendars > Calendar Manager > Pick the calendar > Show upcoming events from this Calendar on the forum index > Yes

jonbaker 03-14-2009 05:56 PM

Quote:

Originally Posted by Preech (Post 1681564)
Would this be to hard to implement into a module or a place it somewhere on vbadvanced.

x2.. thank you.

dismas 03-21-2009 08:41 PM

I'd imagine that you could just create a template module for vBa and add the code to the module.

mizzlinhie 05-15-2009 06:47 AM

how to display the next 5 days events?
Mine is only displaying today's event. :(

soundbarrierpro 05-21-2009 02:12 PM

Installed. Thank you

Mike08 09-23-2009 12:59 AM

Installed....but only with birthdays.

Thank you!

Deimos 10-13-2009 11:05 AM

Is it possible to change the code so it only displays events from a certain calendar?

Gamelobby 10-13-2009 08:21 PM

Quote:

Originally Posted by mizzlinhie (Post 1811059)
how to display the next 5 days events?
Mine is only displaying today's event. :(

That is in the "Forum Home Page Options"


Quote:

Originally Posted by Deimos (Post 1899046)
Is it possible to change the code so it only displays events from a certain calendar?

He answered above, try page 1 (just change calendar id# in code)



My question is:
Why did it drag my Xboxlive leaderboard to the top with it..?

Deimos 10-15-2009 01:39 PM

Quote:

Originally Posted by Gamelobby (Post 1899288)
He answered above, try page 1 (just change calendar id# in code)

Not quite
I can't see anything in the code which lets you pull information from certain calendar ID's?

Gamelobby 10-18-2009 03:48 AM

Hmm i guess not then.. i thought it said that there was a code edit somewhere..



Quote:

Originally Posted by Gamelobby (Post 1899288)
My question is:
Why did it drag my Xboxlive leaderboard to the top with it..?

^ Bump ^

Shanj 01-09-2010 10:37 AM

What's the outlook for VB 4.0?

Also any possibility of filtering by usergroup permissions what they see?

Front Range 01-28-2010 03:51 PM

Quote:

Originally Posted by Shanj (Post 1951045)
What's the outlook for VB 4.0?

https://vborg.vbsupport.ru/showthread.php?t=234221

BigJohnny 09-24-2010 11:07 AM

anybody have any idea why my events don't even show up? I can't get anything to display at the bottom or top.

I'm sure I have all the options set right to show upcoming events for the next 14 days, and I've posted a few events, but they only show up on the calendar.

MagicThemeParks 04-29-2011 01:05 PM

Thanks, was looking for a way to do this :)

Quick question....does anyone know how to display a small image/icon next to each event shown?

Demo: History of the United States

kopq 10-26-2012 01:51 PM

How you do this in 4.2? There is no guest code in FORUMHOME


All times are GMT. The time now is 10:57 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.01220 seconds
  • Memory Usage 1,790KB
  • 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
  • (6)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (27)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete