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.

Changing inbuilt text

5 posters

Go down

Solved Changing inbuilt text

Post by BloodDrunk 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?
Changing inbuilt text Untitl22


Last edited by BloodDrunk on May 12th 2017, 12:44 pm; edited 1 time in total
BloodDrunk
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 May 9th 2017, 4:37 pm

I'll take this as "not possible", so you may throw this into garbage lel..
BloodDrunk
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 May 9th 2017, 5:12 pm

hello

what text exactly do you want to change?
skouliki
skouliki
Manager
Manager

Female Posts : 15118
Reputation : 1696
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Changing inbuilt text

Post by BloodDrunk 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>
BloodDrunk
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 May 9th 2017, 6:00 pm

i do not know sorry maybe someone else can help you
skouliki
skouliki
Manager
Manager

Female Posts : 15118
Reputation : 1696
Language : English,Greek
Location : Greece

http://iconskouliki.forumgreek.com

Back to top Go down

Solved Re: Changing inbuilt text

Post by Guest 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
Guest
Guest


Back to top Go down

Solved Re: Changing inbuilt text

Post by Luiz~ 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/
Luiz~
Luiz~
New Member

Male Posts : 17
Reputation : 9
Language : PT
Location : Brazil

http://ajuda.forumeiros.com/

Back to top Go down

Solved Re: Changing inbuilt text

Post by Guest May 9th 2017, 8:28 pm

Post your index_body template here.
avatar
Guest
Guest


Back to top Go down

Solved Re: Changing inbuilt text

Post by Guest 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
Guest
Guest


Back to top Go down

Solved Re: Changing inbuilt text

Post by Draxion 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.
Draxion
Draxion
Helper
Helper

Male Posts : 2518
Reputation : 321
Language : English
Location : USA

https://www.talesoftellene.com/

Back to top Go down

Solved Re: Changing inbuilt text

Post by Guest 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
Guest
Guest


Back to top Go down

Solved Re: Changing inbuilt text

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

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


Changing inbuilt text Slgray10

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

Male Posts : 51482
Reputation : 3519
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

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