Changing inbuilt text
5 posters
Page 1 of 1
Changing inbuilt text
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?
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
Re: Changing inbuilt text
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>
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>
Re: Changing inbuilt text
In your index_body template, add this script anywhere:
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
in the code above:
- 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:
$("#posts").html(totalposts)
Guest- Guest
Re: Changing inbuilt text
Can you please activate my test account in your forum?
I need it to create the JS for you.
o/
I need it to create the JS for you.
o/
Re: Changing inbuilt text
As I have already told you, you have to make an element on the page:
, add
- Code:
<div id="totalposts"></div>
|
- Code:
$("#totalposts").html(totalposts);
Guest- Guest
Re: Changing inbuilt text
Did you actually test this, @Wolfuryo? I tested this on my site and not even I got it to work.
Re: Changing inbuilt text
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.
Guest- Guest
Re: Changing inbuilt text
Problem solved & topic archived.
|
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Similar topics
» Changing text color
» I need some text changing on this button please.
» Changing text color
» Changing 'You have no new message' to other text-form.
» Text colors not changing
» I need some text changing on this button please.
» Changing text color
» Changing 'You have no new message' to other text-form.
» Text colors not changing
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum