Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Question? (http://www.mysidiaadoptables.com/forum/showthread.php?t=3852)

Aasixx 10-20-2012 06:13 PM

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.

Abronsyth 10-20-2012 09:42 PM

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?

Aasixx 10-20-2012 09:51 PM

Mmm.. Nope.. That didn't seem to work. It gave me a parse/syntax error.

Hall of Famer 10-21-2012 06:34 AM

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:

$sidebar getsidebar();
$browsertitle grabanysetting("browsertitle"); 

This will work out equally well, and it is good for beginners to use and learn programming. Lemme know if you encounter any further issues.

Aasixx 10-21-2012 02:29 PM

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.

Aasixx 10-24-2012 04:44 PM

Any other ideas.. ?


All times are GMT -5. The time now is 10:00 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.