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.

Variable names

+2
tikky
skouliki
6 posters

Go down

In progress Variable names

Post by Guest December 1st 2022, 9:58 am

Hellouz,

Let's say I need variable names and values for:
1. User avatar
2. Username
3. Latest post (his)
4. Latest topic (his)
5. Registration date
6. Data for (birthday, gender, hobbies)

Now, this one is most important. How to get value of newly added field from profile? It's a text value.

All of these variables must be accessed from jQery script on all pages. If not possible on all, only front one then.

Thanks in advance. <3
avatar
Guest
Guest


Back to top Go down

In progress Re: Variable names

Post by skouliki December 1st 2022, 1:34 pm

skouliki
skouliki
Manager
Manager

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

http://iconskouliki.forumgreek.com

phutu02 likes this post

Back to top Go down

In progress Re: Variable names

Post by Guest December 1st 2022, 1:49 pm

Okay, didn't read this so far.
What about other variables? Such as user avatar? Or, special field in profile settings of user? How can I access that value? Given list miss many variables I asked for. But still, it's a good list Very Happy
avatar
Guest
Guest


Back to top Go down

In progress Re: Variable names

Post by skouliki December 1st 2022, 5:15 pm

Each version has different elements
skouliki
skouliki
Manager
Manager

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

http://iconskouliki.forumgreek.com

Back to top Go down

In progress Re: Variable names

Post by Guest December 1st 2022, 5:27 pm

So let's say I want to use them on AwesomeBB. How can I access on Home page to variables for avatar, username, age, last topic, last post and access new field I made in CP? The last one is most important for me.
avatar
Guest
Guest


Back to top Go down

In progress Re: Variable names

Post by tikky December 1st 2022, 5:51 pm

tikky
tikky
Forumember

Posts : 897
Reputation : 157
Language : 🇵🇹

https://www.forumotion.com/create-forum/modernbb

skouliki, TonnyKamper and Razor12345 like this post

Back to top Go down

In progress Re: Variable names

Post by Draxion December 3rd 2022, 8:07 pm

Doing this is possible using a script and Ajax to obtain the data from the specific domain, like for example their profile and the specific profile field.
Draxion
Draxion
Helper
Helper

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

https://www.talesoftellene.com/

Back to top Go down

In progress Re: Variable names

Post by Guest December 3rd 2022, 9:03 pm

Draxion wrote:Doing this is possible using a script and Ajax to obtain the data from the specific domain, like for example their profile and the specific profile field.
Do you have some example of it?
avatar
Guest
Guest


Back to top Go down

In progress Re: Variable names

Post by brandon_g December 4th 2022, 10:09 pm

Hello,

Have you tried looking through the forum templates to see if the variable names that you need can be found there? Since those contain the html code that is being rendered by the browser, the variables used should be in the templates so the browser knows what to request from the server.

-Brandon


Variable names Brando10
Remember to mark your topic Variable names Solved15 when a solution is found.
General Rules | Tips & Tricks | FAQ | Forgot Founder Password?

Variable names Scre1476
Team Leader
Review Section Rules | Request A Review | Sticker Points
brandon_g
brandon_g
Manager
Manager

Male Posts : 10106
Reputation : 923
Language : English
Location : USA

https://www.broadcastingduo.com

Back to top Go down

In progress Re: Variable names

Post by Guest December 4th 2022, 10:13 pm

brandon_g wrote:Hello,

Have you tried looking through the forum templates to see if the variable names that you need can be found there? Since those contain the html code that is being rendered by the browser, the variables used should be in the templates so the browser knows what to request from the server.

-Brandon
Yes, but you cant take the variable name from one template and just use it in another. That's why I ask is there a way to achieve that.
avatar
Guest
Guest


Back to top Go down

In progress Re: Variable names

Post by SirLaplace December 9th 2022, 3:02 pm


I'm extremely interested in this problem as well. I've tried it myself but I can't make it work as it seems, maybe it's about forum versions? Do you think it should also work like this in ModernBB as well or does it need any modification?

The reason I'm looking for this solution is so that I can separate and use specific CSS designing for some specific profile fields than rest.
SirLaplace
SirLaplace
Forumember

Male Posts : 50
Reputation : 4
Language : Turkish, English

http://innoctem.forum.st/

Back to top Go down

In progress Re: Variable names

Post by tikky December 10th 2022, 1:20 am

Do you think it should also work like this in ModernBB as well or does it need any modification?
Works on any version the code is universal Very good
tikky
tikky
Forumember

Posts : 897
Reputation : 157
Language : 🇵🇹

https://www.forumotion.com/create-forum/modernbb

Back to top Go down

In progress Re: Variable names

Post by SirLaplace December 10th 2022, 5:53 pm

pedxz wrote:
Do you think it should also work like this in ModernBB as well or does it need any modification?
Works on any version the code is universal Very good

Ah okay, I finally managed to work the code in a different forum, I must be doing something wrong in my main forum. I'll tweak around and figure it out.

But this code is taking the value from the account that is logged in. I can use it to do things in main page or navbar or widgets etc. Is there a way to make it so that it takes the value from whoever have sent the post so that I can use this variable in the postprofile section? Currently when I place the variable in the postprofile section, under the avatar, it gives the same value to each post, taking it from the logged in user.
SirLaplace
SirLaplace
Forumember

Male Posts : 50
Reputation : 4
Language : Turkish, English

http://innoctem.forum.st/

Back to top Go down

In progress Re: Variable names

Post by Ape December 11th 2022, 10:44 pm

Hi @zachwinch Please make your own topic about this as this is not your topic / post.


Variable names Left1212Variable names Center11Variable names Right112
Variable names Ape_b110
Variable names Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19123
Reputation : 1993
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

In progress Re: Variable names

Post by SirLaplace December 11th 2022, 11:05 pm

Ape wrote:Hi @zachwinch Please make your own topic about this as this is not your topic / post.

Ah, I'm sorry, at first I thought topic was exactly the same thing I'm looking for and thought would be wrong to open the same thing but now I'm not exactly sure anyway. I'll move it to a separate topic. Thanks for the clarification. bounce
SirLaplace
SirLaplace
Forumember

Male Posts : 50
Reputation : 4
Language : Turkish, English

http://innoctem.forum.st/

Ape likes this post

Back to top Go down

Back to top

- Similar topics

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