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.

Omit Time

View previous topic View next topic Go down

Omit Time

Post by itoh on March 3rd 2014, 12:59 am

We notice when someone posts a message, the date and time of the message is indicated on the right side of the screen. Is there any way for us to show only the date and not the time when the message was posted?

itoh
Forumember

Posts : 207
Reputation : 0
Language : english
Location : Japan

Back to top Go down

Re: Omit Time

Post by Pizza Boi on March 3rd 2014, 1:23 pm

Hi Very Happy

Can you please post your Forum URL, version, and the screen shot of your problem? If anything to be seen is restricted to the guests, please unrestrict them if they are related to your problem Smile.

Regards,
Pizza Boi

Pizza Boi
Hyperactive

Male Posts : 2016
Reputation : 160
Language : French
Location : Pizza Hut!

http://redlustempire.forumtl.com/

Back to top Go down

Re: Omit Time

Post by JScript on March 3rd 2014, 1:24 pm

@itoh

Hi!

You can be assured that yes! Will be using JavaScript with "regex", but for this we need to know which version of your forum.

So long,

JS

JScript
Forumember

Male Posts : 741
Reputation : 167
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Re: Omit Time

Post by itoh on March 4th 2014, 12:21 am

Theme version phpBB3 (prosilver)


Sorry my English is not so good. Here is picture and the time showing which we want to remove. Any way to remove the time in every post?



http://i61.tinypic.com/jhg6fp.jpg

itoh
Forumember

Posts : 207
Reputation : 0
Language : english
Location : Japan

Back to top Go down

Re: Omit Time

Post by JScript on March 4th 2014, 5:38 pm

@itoh

No problems with your English friend, what matters is your question solved!

Just add the code below in the JavaScript section with investment in the index or all pages:
Code:

jQuery(function() {
    target = jQuery('.topiclist.forums .icon dd.lastpost');
    target.each(function(index) {
        var oThis = jQuery(this);
        var regex = /<span>([\s\S]*?)<\/span>/im;
        var lastEdit = null;

        var aArray = regex.exec(oThis.html())[1];
        aArray = aArray.split('<br>');
       
        sSearch = aArray[0].indexOf(' at ');
        if (sSearch == -1) {
            sSearch = aArray[0].indexOf(':') - 2;
        }
       
        aArray[0] = aArray[0].substr(0, sSearch);
        aArray = aArray.join('<br>');
        oThis.find('span').html(aArray);
    });
});

Result:


So long,

JS

JScript
Forumember

Male Posts : 741
Reputation : 167
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Re: Omit Time

Post by gotaro on March 5th 2014, 2:42 am

Yes, thank you.

Your = "Just add the code below in the JavaScript section with investment in the index or all pages"

Where in the Admin do we add this code? Where is the JavaScript section with investment in the index or all pages?

Sorry for our not understanding.


Last edited by gotaro on March 8th 2014, 2:44 am; edited 1 time in total

gotaro
Forumember

Male Posts : 33
Reputation : 0
Language : english

Back to top Go down

Re: Omit Time

Post by SLGray on March 5th 2014, 5:39 am

Administration Panel > Modules > HTML/JavaScript > JavaScript Management


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35672
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Re: Omit Time

Post by gotaro on March 6th 2014, 4:35 am

@SLGray wrote:Administration Panel > Modules > HTML/JavaScript > JavaScript Management

Wewent there and allwe see is the following.We don't know how to insert code that was given to us (above).






http://i60.tinypic.com/2dw6sgi.jpg


Last edited by gotaro on March 8th 2014, 2:43 am; edited 2 times in total

gotaro
Forumember

Male Posts : 33
Reputation : 0
Language : english

Back to top Go down

Re: Omit Time

Post by SLGray on March 6th 2014, 4:37 am

Press the button called Create a New JavaScript. The fill in the information.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35672
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Re: Omit Time

Post by gotaro on March 6th 2014, 5:01 am

@SLGray wrote:Press the button called Create a New JavaScript. The fill in the information.


Thank you for kind help. Ifwe do click on the Create and insert that script code that was given to us, will it delete the time in all categories for all postings?

And, if it does not work, canwe remove that script later?

Thank you.


Last edited by gotaro on March 8th 2014, 2:42 am; edited 1 time in total

gotaro
Forumember

Male Posts : 33
Reputation : 0
Language : english

Back to top Go down

Re: Omit Time

Post by SLGray on March 6th 2014, 5:42 am

You can delete any time you want.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35672
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Re: Omit Time

Post by gotaro on March 6th 2014, 7:00 pm

@SLGray wrote:You can delete any time you want.

Thank you.We went to that page and clicked "In all pages" in the placement area and inserted the following code, but the time still shows in all posts on all pages. Didwe do something incorrect?


jQuery(function() {
target = jQuery('.topiclist.forums .icon dd.lastpost');
target.each(function(index) {
var oThis = jQuery(this);
var regex = /<span>([\s\S]*?)<\/span>/im;
var lastEdit = null;

var aArray = regex.exec(oThis.html())[1];
aArray = aArray.split('<br>');

sSearch = aArray[0].indexOf(' at ');
if (sSearch == -1) {
sSearch = aArray[0].indexOf(':') - 2;
}

aArray[0] = aArray[0].substr(0, sSearch);
aArray = aArray.join('<br>');
oThis.find('span').html(aArray);
});
});


Last edited by gotaro on March 8th 2014, 2:41 am; edited 1 time in total

gotaro
Forumember

Male Posts : 33
Reputation : 0
Language : english

Back to top Go down

Re: Omit Time

Post by itoh on March 8th 2014, 2:39 am

Can anyone help us by answering above question. How to delete the time from all the posts on forum? We input the code, but time is still showing. Thank you.

itoh
Forumember

Posts : 207
Reputation : 0
Language : english
Location : Japan

Back to top Go down

Re: Omit Time

Post by Ange Tuteur on March 8th 2014, 2:49 am

Try adding document ready to his code :
Code:
jQuery(document).ready(function() {
    target = jQuery('.topiclist.forums .icon dd.lastpost');
    target.each(function(index) {
        var oThis = jQuery(this);
        var regex = /<span>([\s\S]*?)<\/span>/im;
        var lastEdit = null;

        var aArray = regex.exec(oThis.html())[1];
        aArray = aArray.split('<br>');
       
        sSearch = aArray[0].indexOf(' at ');
        if (sSearch == -1) {
            sSearch = aArray[0].indexOf(':') - 2;
        }
       
        aArray[0] = aArray[0].substr(0, sSearch);
        aArray = aArray.join('<br>');
        oThis.find('span').html(aArray);
    });
});

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Re: Omit Time

Post by itoh on March 8th 2014, 3:34 am

Thanki you. Tried new code, but time still showing.

itoh
Forumember

Posts : 207
Reputation : 0
Language : english
Location : Japan

Back to top Go down

Re: Omit Time

Post by JScript on March 8th 2014, 4:11 am

@Ange Tuteur
"jQuery(document).ready(function() {" === "jQuery(function() {"

@itoh
Hello friend!
There is an error in your forum, for this reason my code does not work, see:


Remove the following JavaScript: 99041.js that contains the code below:
Spoiler:

Code:

var message = "Sorry, right-click has been disabled";

function clickIE() {
 if (document.all) {
 (message);
 return false
 }
}
function clickNS(e) {
 if (document.layers || (document.getElementById && !document.all)) {
 if (e.which == 2 || e.which == 3) {
 (message);
 return false
 }
 }
}
if (document.layers) {
 document.captureEvents(Event.MOUSEDOWN);
 document.onmousedown = clickNS
} else {
 document.onmouseup = clickNS;
 document.oncontextmenu = clickIE
}
document.oncontextmenu = new Function("return false") jQuery(function () {
 target = jQuery('.topiclist.forums .icon dd.lastpost');
 target.each(function (index) {
 var oThis = jQuery(this);
 var regex = /<span>([\s\S]*?)<\/span>/im;
 var lastEdit = null;
 var aArray = regex.exec(oThis.html())[1];
 aArray = aArray.split('<br>');
 sSearch = aArray[0].indexOf(' at ');
 if (sSearch == -1) {
 sSearch = aArray[0].indexOf(':') - 2
 }
 aArray[0] = aArray[0].substr(0, sSearch);
 aArray = aArray.join('<br>');
 oThis.find('span').html(aArray)
 })
});

So long,

JS

JScript
Forumember

Male Posts : 741
Reputation : 167
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Re: Omit Time

Post by itoh on March 8th 2014, 4:20 am

Thank you.

Sorry for all problems and confusion. We don't know where the following is

"Remove the following JavaScript: 99041.js that contains the code below:"


We did delete the following that appears in our JavaScript Codes section?:

Right click has been disabled. etc......

But the time still showing.
Maybe we better forget about trying to delete the time as it is not seem to working.

As you can tell, we don't know much about these things.

itoh
Forumember

Posts : 207
Reputation : 0
Language : english
Location : Japan

Back to top Go down

Re: Omit Time

Post by SLGray on March 8th 2014, 4:59 am

Why do you want to remove the time. Would it not be helpful when you have issues with members?


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35672
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Re: Omit Time

Post by itoh on March 8th 2014, 5:06 am

We all agreed that time is not needed that much. Only date, as time shows different for different areas/country and confusuing to many members. (For us it also shows on seperate line.)

itoh
Forumember

Posts : 207
Reputation : 0
Language : english
Location : Japan

Back to top Go down

Re: Omit Time

Post by SLGray on March 8th 2014, 5:07 am

Please post a link to a topic that guests can see.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35672
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Re: Omit Time

Post by itoh on March 8th 2014, 5:34 am

This is the way it look now. We would like just the date and name and no time:

itoh
Forumember

Posts : 207
Reputation : 0
Language : english
Location : Japan

Back to top Go down

Re: Omit Time

Post by JScript on March 8th 2014, 1:12 pm

@itoh
Hello!
I guess now you could make my code work in your forum:


So long,

JS

JScript
Forumember

Male Posts : 741
Reputation : 167
Language : PT-BR, EN
Location : Brazil

http://jscript.forumeiros.com/

Back to top Go down

Re: Omit Time

Post by itoh on March 8th 2014, 3:50 pm

@JScript wrote:@itoh
Hello!
I guess now you could make my code work in your forum:


So long,

JS

Put your code back but time still shows.

I did remove the "Right Click Disabled" script, but it did not remove the time in all the posts. I put the "Right Click Disalbed" script back, but now that does not work. We can now do a right click. How do we get back our "Right Click Disabled" so no one can right click onpages of fourm?
The "Right Click Disabled" script we put it (which does not work now) is:
Why doesn't it work now?


var message="Sorry, right-click has been disabled";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}
document.oncontextmenu=new Function("return false")

itoh
Forumember

Posts : 207
Reputation : 0
Language : english
Location : Japan

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