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.
The forum of the forums
5 posters

    Changing inbuilt text

    BloodDrunk
    BloodDrunk
    Forumember


    Posts : 127
    Reputation : 4
    Language : English

    Solved Changing inbuilt text

    Post by BloodDrunk Tue 2 May - 19:35

    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 Fri 12 May - 12:44; edited 1 time in total
    BloodDrunk
    BloodDrunk
    Forumember


    Posts : 127
    Reputation : 4
    Language : English

    Solved Re: Changing inbuilt text

    Post by BloodDrunk Tue 9 May - 16:37

    I'll take this as "not possible", so you may throw this into garbage lel..
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: Changing inbuilt text

    Post by skouliki Tue 9 May - 17:12

    hello

    what text exactly do you want to change?

    BloodDrunk
    BloodDrunk
    Forumember


    Posts : 127
    Reputation : 4
    Language : English

    Solved Re: Changing inbuilt text

    Post by BloodDrunk Tue 9 May - 17:45

    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>
    skouliki
    skouliki
    Manager
    Manager


    Female Posts : 15311
    Reputation : 1705
    Language : English,Greek
    Location : Greece

    Solved Re: Changing inbuilt text

    Post by skouliki Tue 9 May - 18:00

    i do not know sorry maybe someone else can help you

    avatar
    Guest
    Guest


    Solved Re: Changing inbuilt text

    Post by Guest Tue 9 May - 18:25

    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)
    Luiz~
    Luiz~
    New Member


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

    Solved Re: Changing inbuilt text

    Post by Luiz~ Tue 9 May - 19:27

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

    o/
    avatar
    Guest
    Guest


    Solved Re: Changing inbuilt text

    Post by Guest Tue 9 May - 20:28

    Post your index_body template here.
    avatar
    Guest
    Guest


    Solved Re: Changing inbuilt text

    Post by Guest Tue 9 May - 21:44

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


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

    Solved Re: Changing inbuilt text

    Post by Draxion Wed 10 May - 1:52

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


    Solved Re: Changing inbuilt text

    Post by Guest Wed 10 May - 5:53

    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.
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51498
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Changing inbuilt text

    Post by SLGray Fri 12 May - 18:42

    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.

      Current date/time is Sun 22 Sep - 22:40