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.

Removing Current Time/Date from PHPBB 3

View previous topic View next topic Go down

Solved Removing Current Time/Date from PHPBB 3

Post by Bpoetic on July 21st 2011, 1:47 am

Does anyone know the code for getting rid of Time/Date for PHPBB 3 forum? Also, the code for the dividing line above Time/Date?


Thanks, Bpoetic


Last edited by Bpoetic on July 23rd 2011, 1:03 pm; edited 2 times in total

Bpoetic
Forumember

Female Posts : 584
Reputation : 44
Language : English
Location : Florida, USA

http://www.bpoetry.net/

Back to top Go down

Solved Re: Removing Current Time/Date from PHPBB 3

Post by Guest on July 21st 2011, 2:16 am

If you put the following script into your homepage message, it will remove the date/time block on the homepage:

Code:
<script type="text/javascript">
jQuery('#main-content>p:contains("Current date/time")').remove();
</script>
The :contains() selector in jQuery is extremely slow and should normally be avoided, but this is one of the very few applications where it is useful and will have no effect on page load times.

(Note to others reading this: the above script will only work on phpBB3 boards.)

Guest
Guest


Back to top Go down

Solved Re: Removing Current Time/Date from PHPBB 3

Post by Bpoetic on July 21st 2011, 5:36 am

Hello Dion, and thanks for your reply. Seems it doesn't work for me as the Homepage Message showed with the raw code:-) I did try putting your code into Site Description, but then there were dots scattered vertically like this:

.
.
.
:

Have another idea?

Thanks again:-) bev

Bpoetic
Forumember

Female Posts : 584
Reputation : 44
Language : English
Location : Florida, USA

http://www.bpoetry.net/

Back to top Go down

Solved Re: Removing Current Time/Date from PHPBB 3

Post by Guest on July 21st 2011, 5:52 am

It sounds like you had the HTML editor turned on for the homepage message. Make sure it's turned off by clicking the "HTML" image above the message box, because you cannot enter scripts or CSS if it's on. When it's off, your homepage message area should look like this:



Guest
Guest


Back to top Go down

Solved Re: Removing Current Time/Date from PHPBB 3

Post by Bpoetic on July 21st 2011, 11:40 am

Sorry Dion, it still doesn't seem to work for me:


Bpoetic
Forumember

Female Posts : 584
Reputation : 44
Language : English
Location : Florida, USA

http://www.bpoetry.net/

Back to top Go down

Solved Re: Removing Current Time/Date from PHPBB 3

Post by ArChKnIgHt on July 21st 2011, 12:59 pm

hi,

it can done throw magic try with CSS

Go To ACP >> DISPLAY >> COLORS >> CSS SHEET
add these code

Code:
#page-body #emptyidcc #outer-wrapper #wrapper #container #content #main #main-content p {
display: none;
}

hope that help, ArChKnIgHt

ArChKnIgHt
Forumember

Male Posts : 134
Reputation : -1
Language : Arabic | English | French | CSS | HTML | JS
Location : Egypt

http://ultragamerz.forumotion.net/

Back to top Go down

Solved Re: Removing Current Time/Date from PHPBB 3

Post by Bpoetic on July 21st 2011, 1:47 pm

Hi ArChKnIgHt!

Well thanks, but your CSS Code didn't seem to work for me:-) I'm assuming this code was to remove the line neath the LOGO?

I added it to my CSS:

And this is the outcome:

Bpoetic
Forumember

Female Posts : 584
Reputation : 44
Language : English
Location : Florida, USA

http://www.bpoetry.net/

Back to top Go down

Solved Re: Removing Current Time/Date from PHPBB 3

Post by Guest on July 22nd 2011, 3:22 am

Actually nothing will work for you until you fix the HTML code you've put in the widgets. There are open tags, incorrectly-defined attributes, and improperly-nested blocks in one of the widgets!

Fix that widget, or turn off the widget display, and the script I provided WILL work.

Guest
Guest


Back to top Go down

Solved Re: Removing Current Time/Date from PHPBB 3

Post by Bpoetic on July 22nd 2011, 10:11 am

I wouldn't begin to know how to fix those! Want to tell me what's wrong? I did not code these widgets, just used what is available in the box . . .

Home:
Code:
<DIV align=left><FONT size=3 face=Arial>◄◄</FONT><A href="http://www.bpoetry.net/"><FONT color=black size=2 face=Arial><STRONG><EM>Home</EM></STRONG></FONT></A></DIV> 


Poetry Selections:
Code:
<DIV align=left><FONT size=3 face=Arial>◄◄</FONT><A href="http://www.bpoetry.net/h10-poetrybill"><FONT color=black size=2 face=Arial><STRONG><EM>Poetry Selections</EM></STRONG></FONT></A></DIV>


Stories in Short:
Code:
 <DIV align=right><FONT size=3 face=Arial>►</FONT><A href="http://www.bpoetry.net/c9-stories-in-short"><FONT color=black size=2 face=Arial><EM><STRONG>Stories in Short</STRONG></EM></FONT></A></DIV>


Articles:
Code:
<DIV align=right><FONT size=3 face=Arial>►</FONT><A href="http://www.bpoetry.net/c10-articles"><FONT color=black size=2 face=Arial><EM><STRONG>Articles</STRONG></EM></FONT></A></DIV>
 



Bpoetic
Forumember

Female Posts : 584
Reputation : 44
Language : English
Location : Florida, USA

http://www.bpoetry.net/

Back to top Go down

Solved Re: Removing Current Time/Date from PHPBB 3

Post by Guest on July 22nd 2011, 7:36 pm

This is an example of why I suggest to people that they turn off the HTML editor and leave it off. You posted what you thought was in your widgets. Here's what is actually going into your first widget:

Code:
<DIV align=left><DIV id=page-body><DIV id=content-container><DIV id=outer-wrapper><DIV id=wrapper><DIV id=container><DIV id=content><DIV id=left>◄◄<A href="http://www.bpoetry.net/"><FONT color=black size=2 face=Arial><STRONG><EM>Home</EM></STRONG></FONT></A></DIV></DIV></DIV></DIV></DIV></DIV></DIV></DIV>

There are several errors in this HTML. The biggest are all the DIV tags with IDs which duplicate DIV tags already defined. It's the reason the script I provided doesn't work. In addition, the "align" attribute in the first DIV tag, as well as the FONT tag, are no longer supported in HTML5 and will stop working in most browsers in the near future.

What you need, without using the HTML editor, is:

Code:
<div style="text-align:left">◄◄<a style="color:black;font-family:Arial;font-size:1.1em" href="http://www.bpoetry.net/"><b><i>Home</i></b></a></div>
From this, it should be straightforward to change the other links as well.

Guest
Guest


Back to top Go down

Solved Re: Removing Current Time/Date from PHPBB 3

Post by Bpoetic on July 23rd 2011, 12:42 am

Yes, I went back and looked at the above with the HTML editor turned off, and that is exactly what I see. Good to know I'm not crazy:-) It's a text editor problem . . .

I have been playing around with the widgets this afternoon, and finally realized, even WITH the editor's crazy coding, that your script will work! BUT it only works as long as you're on the traditional forum homepage.

As soon as you leave the homepage and enter a category, the date/time will show again:


Given that I don't like seeing the blank green Home Page message box, and that I'd like the date/time to be gone from all pages, something in CSS might be a better cure? If there is a code for CSS that you know of, I'd love it if you'd share it with me. If not, I'd say this horse has been beat into the ground, and I'll mark the topic solved.

Thank you very much for all your help, dion!


Bpoetic
Forumember

Female Posts : 584
Reputation : 44
Language : English
Location : Florida, USA

http://www.bpoetry.net/

Back to top Go down

Solved Re: Removing Current Time/Date from PHPBB 3

Post by Guest on July 23rd 2011, 4:38 am

OK, now we're getting somewhere...

The reason my script only works on the homepage is because it's in the homepage message! For it to work on all pages, it must be placed where it will be accessed on every page. The easiest way to do that is to put the script in an announcement.

First, remove the script from the homepage message. Then go to ACP>General>Announcements, Set Activate Announcements to Yes, Announcements Display on All Pages, and Scrolling to Deactivate, and then click Save. Now create an announcement and place the following script in that announcement. Like before, make sure to keep the HTML editor turned off.

Code:
<script type="text/javascript">
jQuery(function() {
jQuery('#main-content>p:contains("Current date/time")').remove();
});
</script>
Good luck!

Guest
Guest


Back to top Go down

Solved Re: Removing Current Time/Date from PHPBB 3

Post by Bpoetic on July 23rd 2011, 6:14 am

Great! It does work. Thank you, dion! I'll look to see if I can find a way to change the color of the Announcement block . . .

Thanks for all your help:-)

Bpoetic
Forumember

Female Posts : 584
Reputation : 44
Language : English
Location : Florida, USA

http://www.bpoetry.net/

Back to top Go down

Solved Re: Removing Current Time/Date from PHPBB 3

Post by Base on July 23rd 2011, 11:01 am

So, is this problem solved? Smile

Base
Forumaster

Male Posts : 10386
Reputation : 1687
Language : English and French
Location : United Kingdom, England

http://forumotionhub.net

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