#1
|
||||
|
||||
Question?
I'm creating a new page with PHP (I already have it setup) because I grabbed my template.html and replaced :ARTICLECONTENT: with my PHP's text. Well, in my side bar I have (in functions/functions.php) $sidebar = "<h2><font color='#ccb9ec'>Welcome, {$loggedinname}!<br /></font></h2> but {$loggedinname} doesn't work in my normal PHP file. How can I get it to work where it will show the logged in user's username? Because :SIDEFEED:, :BROWSERTITLE:, etc doesn't work in my PHP file. I also need to get the logged in user's cash amount to show up.. Thanks.
__________________
|
#2
|
||||
|
||||
Eh, to create a new page that is still showing the site's theme, then you find the file called 'Blank.php' and copy it (rename it to the name of the page you're trying to make) and put your content between the things that say something like start here and end here....or something like that...
...is that what you are intending to do?
__________________
My Mods Site (1.3.4, 2020 Mods) |
#3
|
||||
|
||||
Mmm.. Nope.. That didn't seem to work. It gave me a parse/syntax error.
__________________
|
#4
|
||||
|
||||
Well :SIDEFEED:, :BROWSERTITLE: are special keywords used in the html template file that reference back to the php variable stored in your database's setting variables. They are like placeholders in the template file, way too complicated for beginners to play with. If you want to create a variable of your sitefeed(sidebar) and browsertitle, use these instead:
PHP Code:
__________________
Mysidia Adoptables, a free and ever-improving script for aspiring adoptables/pets site. |
#5
|
||||
|
||||
This is what it looks like on my page (I put the php code where :ARTICLECONTENT: would have gone and it works fine) and here's what it looks like:
PHP page: <div id="sidebar"> <ul> $sidebar = getsidebar(); </ul> </div> My actual template.html: <div id="sidebar"> <ul> :SIDEFEED: </ul> </div> The $sidebar = getsidebar(); didn't work. It just shows that text where my sidebar should be.
__________________
|
#6
|
||||
|
||||
Any other ideas.. ?
__________________
|
|
|
What's New? |
What's Hot? |
What's Popular? |