Jump to content
Froxlor Forum
  • 0

Custom Links


lordimac

Question

Posted

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

Posted

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

Posted

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?

Posted

<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

Posted

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.

Posted

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

Posted

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. ;)

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...