lordimac Posted October 3, 2010 Posted October 3, 2010 Hi, for my own Froxlor Template I want to add some Custom Links to my Header (just single Links, not an Menu like with function.buildNavigation.php). Is this possible? I need the Username Output, Logout Link with Session ID and Home Button (Overview) with Session Link. Thank you
d00p Posted October 4, 2010 Posted October 4, 2010 it's possible. Just check out the existing templates how they integrate dynamic value and how they are called from the php-scripts. It's pretty simple
lordimac Posted October 4, 2010 Author Posted October 4, 2010 Ok, I just found $userinfo[loginname] for Username and $userinfo[hash] for the Hashtag/Session-ID. But I could not figure out how to create a Link which links in Customer Backend to customer_index.php and in Admin Backend to admin_index.php. Could you please explain me this?
d00p Posted October 4, 2010 Posted October 4, 2010 <a href="customer_index.php?s={$s}">Customer Index</a> Then you have to call it using eval() (see other templates/files for examples) and $s will be replaced by the session-id
lordimac Posted October 4, 2010 Author Posted October 4, 2010 Thank you for the Info with $s, its shorter then $userinfo[hash]. But I don't understand the Thing with eval(). Could you please give me an example for an Link to admin_index.php/customer_index.php from Admin/Customer Backend? Sorry, but I don't have many PHP Knowledges.
d00p Posted October 4, 2010 Posted October 4, 2010 you Need to Call your template somewhere, if its somethings in the Header you Night Want to check out Index.php and Look for the getTemplate Function for the header, there you can See how the eval() Call is made
lordimac Posted October 4, 2010 Author Posted October 4, 2010 Sorry, but I can't figure it out, I think my PHP Knowledges are too low for this. But I've found out that $userinfo['adminsession'] contains an 1 for Admin or 0 for Customer. With the Help of this Variable I've written the following Code: <if $userinfo['adminsession'] == 1> <a href="admin_index.php?s={$s}"></a> <else> <a href="customer_index.php?s={$s}"></a> </if> Short Version: <a href="<if $userinfo['adminsession'] == 1>admin<else>customer</if>_index.php?s={$s}"></a> It's not your Solution, but it works. All roads lead to Rome.
Question
lordimac
Hi,
for my own Froxlor Template I want to add some Custom Links to my Header (just single Links, not an Menu like with function.buildNavigation.php).
Is this possible? I need the Username Output, Logout Link with Session ID and Home Button (Overview) with Session Link.
Thank you
7 answers to this question
Recommended Posts
Archived
This topic is now archived and is closed to further replies.