News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Global Headers and Footers

Started by SMFHacks.com Team, August 02, 2006, 10:39:07 PM

Previous topic - Next topic

w0lfman


hcfwesker

Your welcome.  Good Luck figuring out the clock.  If you want, post the clock code here, in CODE tags, and I may take a look at it for you.  I have a custom html php code i use for adding scripts.  Might work in your case.

w0lfman

It looks like this...

<script language="JavaScript">
TargetDate = "12/31/2020 5:00 AM";
BackColor = "green";
ForeColor = "white";
CountActive = true;
CountStepper = -1;
LeadingZero = true;
DisplayFormat = "%%D%% Days, %%H%% Hours, %%M%% Minutes, %%S%% Seconds.";
FinishMessage = "It is finally here!";
</script>
<script language="JavaScript" src="http://scripts.hashemian.com/js/countdown.js"></script>



<center><font color="ffffff">Countdown to Thundering Herd Football</font></center>

<center><SCRIPT LANGUAGE = "JavaScript">

function countdown_clock(year, month, day, hour, minute, format)
{
//I chose a div as the container for the timer, but
//it can be an input tag inside a form, or anything
//who's displayed content can be changed through
//client-side scripting.
html_code = '<div id="countdown"></div>';

document.write(html_code);

countdown(year, month, day, hour, minute, format);
}

function countdown(year, month, day, hour, minute, format)
{
Today = new Date();
Todays_Year = Today.getFullYear() - 2000;
Todays_Month = Today.getMonth() + 1;

//Convert both today's date and the target date into miliseconds.
Todays_Date = (new Date(Todays_Year, Todays_Month, Today.getDate(),
Today.getHours(), Today.getMinutes(), Today.getSeconds())).getTime();
Target_Date = (new Date(year, month, day, hour, minute, 00)).getTime();

//Find their difference, and convert that into seconds.
Time_Left = Math.round((Target_Date - Todays_Date) / 1000);

if(Time_Left < 0)
Time_Left = 0;

switch(format)
{
case 0:
//The simplest way to display the time left.
document.all.countdown.innerHTML = Time_Left + ' seconds';
break;
case 1:
//More datailed.
days = Math.floor(Time_Left / (60 * 60 * 24));
Time_Left %= (60 * 60 * 24);
hours = Math.floor(Time_Left / (60 * 60));
Time_Left %= (60 * 60);
minutes = Math.floor(Time_Left / 60);
Time_Left %= 60;
seconds = Time_Left;

dps = 's'; hps = 's'; mps = 's'; sps = 's';
//ps is short for plural suffix.
if(days == 1) dps ='';
if(hours == 1) hps ='';
if(minutes == 1) mps ='';
if(seconds == 1) sps ='';

document.all.countdown.innerHTML = days + ' day' + dps + ' ';
document.all.countdown.innerHTML += hours + ' hour' + hps + ' ';
document.all.countdown.innerHTML += minutes + ' minute' + mps + ' and ';
document.all.countdown.innerHTML += seconds + ' second' + sps;
break;
default:
document.all.countdown.innerHTML = Time_Left + ' seconds';
}

//Recursive call, keeps the clock ticking.
setTimeout('countdown(' + year + ',' + month + ',' + day + ',' + hour + ',' + minute + ',' + format + ');', 1000);
}

</SCRIPT>


<script type="text/javascript">
countdown_clock(10, 09, 02, 07, 30, 1);
</script>
 
</center>
<center><font color="ffffff">Marshall @ Ohio State <br> Ohio Stadium - Columbus, OH <br>Thursday, September 2, 2010 7:30 pm <br>  </font></center>

Derosion

#723
Great mod, thanks for the share. I'm just having a slight problem while installing the package.

I get this,



I continued and installed it anyways but nothing happens, the package doesn't do anything. Help :o?

I'm using SMF 2.0 RC5. I believe my friend got it to work with RC5 before ???.

vbgamer45

You will need to do that install manually that is a keep edit for the control panel link
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Derosion

Quote from: vbgamer45 on March 05, 2011, 07:31:25 PM
You will need to do that install manually that is a keep edit for the control panel link

Sorry, can you break that down a bit more clearer? Not entirely sure what you mean.

vbgamer45

Get the manual install instructions from the mod site then apply the edit to the Admin.php manually.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

ccleanerfan


vbgamer45

Quote from: ccleanerfan on March 16, 2011, 08:00:05 PM
where is this mod located? cant find it on 2.0RC5
Should add a menu area in the admin area called Global Headers and Footers
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

ccleanerfan

Quote from: vbgamer45 on March 16, 2011, 08:43:11 PM
Quote from: ccleanerfan on March 16, 2011, 08:00:05 PM
where is this mod located? cant find it on 2.0RC5
Should add a menu area in the admin area called Global Headers and Footers

nope, i get all test failures when uninstalling...

joey791

I'm having a problem that even with center tags its still offsetting everything to the right, you can see here at the bottom of the page

http://dadshideout.com/index.php

Y.

Hello,
I've setup the "Global Headers and Footers" on smf 1.1.13 in french and everything seemed to went well.

But I don't see the options in the administration.

It may be a language issue.

But I have no clue how to fix it ...
I can translate if needed and share as well.

any ideas?


Y.

vbgamer45

Copy text from themes/default/languages/modifications.english.php to themes/default/languages/modications.yourlanguage.php
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Y.

That's maybe my problem,
both files are empty :


<?php
// Version: 1.1; Modifications

?>


vbgamer45

Yeah that would cause an issue it needs the text add from those mods otherwise you get an empty space
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

jb1drv

I installed this but i dont know where to click/hot to access this. Can anyone please help me?

Y.

All fixed now.

I had an extra "/" in my ftp path settings (I put /htdocs/ instead of /htdocs ) ... tricky!
& I had to complete the language files (my forum is in french).

All great now.

thank you for your answer & try to get better question next time :D

Y.

vbgamer45

Quote from: jb1drv on April 14, 2011, 06:20:03 PM
I installed this but i dont know where to click/hot to access this. Can anyone please help me?
Looks like missing language file goto admin -> server settings and set language to just english instead of english utf8
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

jb1drv

Quote from: vbgamer45 on April 15, 2011, 03:46:08 PM
Quote from: jb1drv on April 14, 2011, 06:20:03 PM
I installed this but i dont know where to click/hot to access this. Can anyone please help me?
Looks like missing language file goto admin -> server settings and set language to just english instead of english utf8

the default language is set as english. I think that it installed correctly, but i don't know where to access/edit the header or footer. Its my first forum

vbgamer45

It would be in the admin area a link to global headers/footers
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: