The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Edit date/time text

View previous topic View next topic Go down

Solved Edit date/time text

Post by mahdy on January 18th 2012, 11:10 pm

Hi,

Could you please tell me how i can change the text of Current date/time with my own text. For instance, I'd like my members to see 'The date & time is' instead of 'Current date/time is'.

I also want to change 'Your last visit' text as well.

Thank You.

mahdy
Forumember

Male Posts : 33
Reputation : 1
Language : :'(
Location : London

Back to top Go down

Solved Re: Edit date/time text

Post by LGforum on January 19th 2012, 12:11 am

You can access them both easily on a phpbb3 board.

Code:

$(function() {
var x=document.getElementById('main-content');
var lastvisit=x.firstChild;
lastvisit.innerHTML=lastvisit.innerHTML.replace(/Your last visit was on/,'YOUR TEXT HERE');

var currentdatetime=lastvisit.nextSibling;
currentdatetime.innerHTML=currentdatetime.innerHTML.replace(/Current date\/time/,'NEW TEXT HERE');
});

I laid it out nicely to make it easier to understand.


Last edited by LGforum on January 19th 2012, 12:42 am; edited 1 time in total

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Edit date/time text

Post by !_NICK_! on January 19th 2012, 12:27 am

How about PunBB

!_NICK_!
Active Poster

Male Posts : 1505
Reputation : 69
Language : English, HTML, and CSS
Location : In the middle of no return.

Back to top Go down

Solved Re: Edit date/time text

Post by LGforum on January 19th 2012, 12:41 am

Your last visit was on

Code:

$(function() {
var x=document.getElementById('pun-visit');
var lastvisit=x.lastChild;
lastvisit.innerHTML=lastvisit.innerHTML.replace(/Your last visit was on/,'YOUR TEXT HERE');
});

Where is the 'current date/time' bit on punBB?

LGforum
Hyperactive

Male Posts : 2260
Reputation : 258
Language : English
Location : UK

http://www.avacweb.com/

Back to top Go down

Solved Re: Edit date/time text

Post by mahdy on January 19th 2012, 3:42 am

It works :wouhou:



Thank You, LGforum

mahdy
Forumember

Male Posts : 33
Reputation : 1
Language : :'(
Location : London

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum