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.

Changing inbuilt text

View previous topic View next topic Go down

Solved Changing inbuilt text

Post by BloodDrunk on May 2nd 2017, 7:35 pm

Hello,
Firstly, I know I could somehow accomplish what I want using jQuery, but I'm wondering if it's possible to edit the text that appears in the screenshot? I just want to access the numbers, and members, and simply re-write the text?


Last edited by BloodDrunk on May 12th 2017, 12:44 pm; edited 1 time in total
avatar
BloodDrunk
Forumember

Posts : 127
Reputation : 4
Language : English

http://www.nfssecrets.tk/

Back to top Go down

Solved Re: Changing inbuilt text

Post by BloodDrunk on May 9th 2017, 4:37 pm

I'll take this as "not possible", so you may throw this into garbage lel..
avatar
BloodDrunk
Forumember

Posts : 127
Reputation : 4
Language : English

http://www.nfssecrets.tk/

Back to top Go down

Solved Re: Changing inbuilt text

Post by skouliki on May 9th 2017, 5:12 pm

hello

what text exactly do you want to change?
avatar
skouliki
Graphic Designer
Graphic Designer

Female Posts : 3175
Reputation : 494
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Changing inbuilt text

Post by BloodDrunk on May 9th 2017, 5:45 pm

All of these, but only texts. I was thinking of somewhat grabbing the global variables, and just put my own text and add those variables to the text.

But here's how I want it to be like:

Forum Members
Registered members: <list all online registered members here>

Birthdays today: <variable>
Upcoming birthdays (in 30 days): <variable>

Total online: <variable> users[Members:<#ofonlinemembers>, Guests:<#ofonlineguests>, Robots:<#ofonlinerobots>]
Record online users: <variable>

Forum Statistics
Total posts: <variable>
Registered users: <variable>
Newest member: <variable>
avatar
BloodDrunk
Forumember

Posts : 127
Reputation : 4
Language : English

http://www.nfssecrets.tk/

Back to top Go down

Solved Re: Changing inbuilt text

Post by skouliki on May 9th 2017, 6:00 pm

i do not know sorry maybe someone else can help you
avatar
skouliki
Graphic Designer
Graphic Designer

Female Posts : 3175
Reputation : 494
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Changing inbuilt text

Post by Justice™ on May 9th 2017, 6:25 pm

In your index_body template, add this script anywhere:
Code:
$(function(){
var totalposts='{TOTAL_POSTS}'.match(/\d+/);
var totalmembers='{TOTAL_USERS}'.match(/\d+/);
var lastuserurl='{NEWEST_USER}'.match(/\/u\d+/);
var lastusername='{NEWEST_USER}'.split("strong")[2].match(/[^><\/]/g).join("");
var totalon='{TOTAL_USERS_ONLINE}'.match(/>\d+\</).join("").match(/\d+/).join("");
var onregistred='{TOTAL_USERS_ONLINE}'.match(/\d+\ Registered/).join("").match(/\d+/).join("");
var onvisitors='{TOTAL_USERS_ONLINE}'.match(/\d+\ Guest/).join("").match(/\d+/).join("");
var onhidden='{TOTAL_USERS_ONLINE}'.match(/\d+\ Hidden/).join("").match(/\d+/).join("");
var recordonline='{RECORD_USERS}'.match(/>\d+\</).join("").match(/\d+/).join("");
var userliston='{LOGGED_IN_USER_LIST}'.split("Registered Users: ")[1];
})

You will now be able to use the following js variables:
totalposts-Total number of posts on your forum
totalmembers-Total number of members on your forum
lastuserurl-Link to the last registered user's profile
lastusername-Name of the last registered user
totalon-Number of users online now(Registered+Hidden+Visitors)
onregistered-Number of registered users online now
onvisitors-Number of visitors online now
onhidden-Number of hidden users online now
recordonline-Most users online at the same moment
userliston-The list of online users

How to use


Let's say that the element you want to contain the number of posts has the id #posts. Than to display the total number of posts there, you would have to add this code after
Code:
$(function(){
in the code above:
Code:
$("#posts").html(totalposts)
avatar
Justice™
Forumember

Posts : 521
Reputation : 121
Language : Romanian and English

http://board.realmsn.com

Back to top Go down

Solved Re: Changing inbuilt text

Post by Luiz~ on May 9th 2017, 7:27 pm

Can you please activate my test account in your forum?
I need it to create the JS for you. Wink

o/
avatar
Luiz~
New Member

Male Posts : 16
Reputation : 7
Language : PT
Location : Brazil

http://ajuda.forumeiros.com/

Back to top Go down

Solved Re: Changing inbuilt text

Post by Justice™ on May 9th 2017, 8:28 pm

Post your index_body template here.
avatar
Justice™
Forumember

Posts : 521
Reputation : 121
Language : Romanian and English

http://board.realmsn.com

Back to top Go down

Solved Re: Changing inbuilt text

Post by Justice™ on May 9th 2017, 9:44 pm

As I have already told you, you have to make an element on the page:
Code:
<div id="totalposts"></div>
Than in the JS code, after
Code:
$(function(){
, add
Code:
$("#totalposts").html(totalposts);
Send me a PM with the founder username and password if you're still having troubles.
avatar
Justice™
Forumember

Posts : 521
Reputation : 121
Language : Romanian and English

http://board.realmsn.com

Back to top Go down

Solved Re: Changing inbuilt text

Post by Draxion on May 10th 2017, 1:52 am

Did you actually test this, @Wolfuryo? I tested this on my site and not even I got it to work.


NEVER provide your founder's account or email
Please provide forum's URL when dealing with design and appearance issues
Don't forget to mark the topic as when the issue is resolved. This helps the staff greatly.
PM Support is prohibited!
TOS | General Rules | FAQ | Tricks & Tips | Latest Updates | Introduce Yourself

avatar
Draxion
Support Moderator
Support Moderator

Male Posts : 1846
Reputation : 230
Language : English
Location : USA

http://www.draxionsgameden.com/

Back to top Go down

Solved Re: Changing inbuilt text

Post by Justice™ on May 10th 2017, 5:53 am

Matter of fact, yes, I tested it for a few months. I am using it on my forum and it works perfectul. Anyway, I'm waiting for a PM with founder username and password from BloodDrunk.
avatar
Justice™
Forumember

Posts : 521
Reputation : 121
Language : Romanian and English

http://board.realmsn.com

Back to top Go down

Solved Re: Changing inbuilt text

Post by SLGray on May 12th 2017, 6:42 pm

Problem solved & topic archived.
Please read our forum rules: ESF General Rules


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

avatar
SLGray
Administrator
Administrator

Male Posts : 40897
Reputation : 2776
Language : English
Location : United States

https://fmthemes.forumotion.com/

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