Hello again,
I was wondering if there was a way to be able to use standard link variables such as {U_LOGIN_LOGOUT} in an xml file that is inside a template.
The idea behind this, is a flash menu that can be changed by a user of a style at any point. I realize that not everyone will want the same menu words and that I want to be able to use the variable to show how many messages a member has in a flash button.
The style I'm constructing can be seen here: http://www.dark-frost.com along with the basic menu so far.
I've made the menu editable through an xml file that is also inside the style theme folder, but I cannot get it to read the variables.
Any idea?
Can link variables ({U_LOGIN_LOGOUT}) be used from an xml fi
- igorw
- Past Contributor
- Posts: 1967
- Joined: 01 Jun 2006, 20:48
- Real name: Igor [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Can link variables ({U_LOGIN_LOGOUT}) be used from an xm
Hi,
can you please explain what you mean with "an xml file that is inside a template". How is it inside? How is it used?
Thanks
Also a tipp, you can define template variables yourself inside the template, using <!-- DEFINE varname value --> afaik.
can you please explain what you mean with "an xml file that is inside a template". How is it inside? How is it used?
Thanks
Also a tipp, you can define template variables yourself inside the template, using <!-- DEFINE varname value --> afaik.
- we're poor!
Re: Can link variables ({U_LOGIN_LOGOUT}) be used from an xm
Hey,
The xml file is read by the flash menu for basic structure and values of specific functions, IE: width, height, link, alt text etc.
What I mean by inside the template, is that it's placed inside the style folder.
I thought it would be fine because it was read from within the template folder itself, but apparently it's not the "index" page so the variables need to be defined all over again.
Can you give an example of how the variable can be defined? like <!-- DEFINE {SOMETHING_LIKE_THIS} Url or something --> ?
Or if you know of any documentation that shows this? I have never heard of being able to do this, but if it's possible it would answer MANY questions for new functionality in styles
The xml file is read by the flash menu for basic structure and values of specific functions, IE: width, height, link, alt text etc.
What I mean by inside the template, is that it's placed inside the style folder.
I thought it would be fine because it was read from within the template folder itself, but apparently it's not the "index" page so the variables need to be defined all over again.
Can you give an example of how the variable can be defined? like <!-- DEFINE {SOMETHING_LIKE_THIS} Url or something --> ?
Or if you know of any documentation that shows this? I have never heard of being able to do this, but if it's possible it would answer MANY questions for new functionality in styles
- igorw
- Past Contributor
- Posts: 1967
- Joined: 01 Jun 2006, 20:48
- Real name: Igor [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Can link variables ({U_LOGIN_LOGOUT}) be used from an xm
Oooh, that's not so easy. The css files that also contain such variables are parsed by PHP first and then sent to the client. So you would have to parse it per PHP, output it, and then read the parsed output via HTTP, which is rather complicated, but it might work.
What you would have to do is create a page that is integrated into phpBB, and then parse the XML file per it's template system.
What you would have to do is create a page that is integrated into phpBB, and then parse the XML file per it's template system.
- we're poor!
Re: Can link variables ({U_LOGIN_LOGOUT}) be used from an xm
Ahh, what I feared
I never thought xml would work, but it would have been cool to give them a choice, I guess I will just stick to a basic menu, and if they want a new one they can request it.
Anyway, more on the self defined variables. After thinking on it, the only way I can see this working would be something like this right?
define('MY_OWN_LINK', 'http://www.mysite.com/'); in a standard include
<!-- DEFINE('MY_OWN_LINK', 'http://www.mysite.com/') -->
Or am I dreaming?
I never thought xml would work, but it would have been cool to give them a choice, I guess I will just stick to a basic menu, and if they want a new one they can request it.
Anyway, more on the self defined variables. After thinking on it, the only way I can see this working would be something like this right?
define('MY_OWN_LINK', 'http://www.mysite.com/'); in a standard include
<!-- DEFINE('MY_OWN_LINK', 'http://www.mysite.com/') -->
Or am I dreaming?
- igorw
- Past Contributor
- Posts: 1967
- Joined: 01 Jun 2006, 20:48
- Real name: Igor [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Can link variables ({U_LOGIN_LOGOUT}) be used from an xm
In phpBB3, that's $user->ip
- we're poor!
Re: Can link variables ({U_LOGIN_LOGOUT}) be used from an xm
Is there one that will show the IP of the poster?
The one above shows each user their own IP...
So in viewtopic, under each user's information is it possible to have the ip of that member show?
Like this
Frost
Registered User
IP: 12.12.12.12
eviL<3
Admin
IP: 23:23:23:23
Other Member
Registered User
IP: 34:34:34:34
The one above shows each user their own IP...
So in viewtopic, under each user's information is it possible to have the ip of that member show?
Like this
Frost
Registered User
IP: 12.12.12.12
eviL<3
Admin
IP: 23:23:23:23
Other Member
Registered User
IP: 34:34:34:34
- igorw
- Past Contributor
- Posts: 1967
- Joined: 01 Jun 2006, 20:48
- Real name: Igor [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: Can link variables ({U_LOGIN_LOGOUT}) be used from an xm
Yes, but this is saved on per-post basis, so you'd have to do an SQL query on the posts table.
- we're poor!
Re: Can link variables ({U_LOGIN_LOGOUT}) be used from an xm
Do you know of a place where I can learn how to do that?
I generally know how, and what files, but still not good enough to write it myself off the top of my head.
Should I just look at mcp.php for the details area and copy and paste until I get it right?
I generally know how, and what files, but still not good enough to write it myself off the top of my head.
Should I just look at mcp.php for the details area and copy and paste until I get it right?
Return to “phpBB Development discussion”
Who is online
Users browsing this forum: No registered users and 26 guests