The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Removing Current Time/Date from PHPBB 3

3 posters

Go down

Solved Removing Current Time/Date from PHPBB 3

Post by Bpoetic Thu Jul 21 2011, 02:47

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?
Removing  Current Time/Date from PHPBB 3 Timeda10

Thanks, Bpoetic


Last edited by Bpoetic on Sat Jul 23 2011, 14:03; edited 2 times in total
Bpoetic
Bpoetic
Forumember

Female Posts : 594
Reputation : 46
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 Thu Jul 21 2011, 03:16

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.)
avatar
Guest
Guest


Back to top Go down

Solved Re: Removing Current Time/Date from PHPBB 3

Post by Bpoetic Thu Jul 21 2011, 06:36

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
Bpoetic
Forumember

Female Posts : 594
Reputation : 46
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 Thu Jul 21 2011, 06:52

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:

Removing  Current Time/Date from PHPBB 3 Hpmes
avatar
Guest
Guest


Back to top Go down

Solved Re: Removing Current Time/Date from PHPBB 3

Post by Bpoetic Thu Jul 21 2011, 12:40

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

Removing  Current Time/Date from PHPBB 3 Messag10Removing  Current Time/Date from PHPBB 3 Time_b10
Bpoetic
Bpoetic
Forumember

Female Posts : 594
Reputation : 46
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 Thu Jul 21 2011, 13:59

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
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 Thu Jul 21 2011, 14:47

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:
Removing  Current Time/Date from PHPBB 3 Css_bm10
And this is the outcome:
Removing  Current Time/Date from PHPBB 3 Line_b10
Bpoetic
Bpoetic
Forumember

Female Posts : 594
Reputation : 46
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 Fri Jul 22 2011, 04:22

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.
avatar
Guest
Guest


Back to top Go down

Solved Re: Removing Current Time/Date from PHPBB 3

Post by Bpoetic Fri Jul 22 2011, 11:11

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> 
Removing  Current Time/Date from PHPBB 3 Whome_10

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>
Removing  Current Time/Date from PHPBB 3 Ppoetr10

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>
Removing  Current Time/Date from PHPBB 3 Short_10

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>
 
Removing  Current Time/Date from PHPBB 3 Articl10

Removing  Current Time/Date from PHPBB 3 Forum_10
Bpoetic
Bpoetic
Forumember

Female Posts : 594
Reputation : 46
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 Fri Jul 22 2011, 20:36

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.
avatar
Guest
Guest


Back to top Go down

Solved Re: Removing Current Time/Date from PHPBB 3

Post by Bpoetic Sat Jul 23 2011, 01:42

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.
Removing  Current Time/Date from PHPBB 3 Abc10
As soon as you leave the homepage and enter a category, the date/time will show again:
Removing  Current Time/Date from PHPBB 3 Abcd10

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
Bpoetic
Forumember

Female Posts : 594
Reputation : 46
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 Sat Jul 23 2011, 05:38

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!
avatar
Guest
Guest


Back to top Go down

Solved Re: Removing Current Time/Date from PHPBB 3

Post by Bpoetic Sat Jul 23 2011, 07:14

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
Bpoetic
Forumember

Female Posts : 594
Reputation : 46
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 Sat Jul 23 2011, 12:01

So, is this problem solved? Smile
Base
Base
Forumaster

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

http://forumotionhub.net

Back to top Go down

Back to top

- Similar topics

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