Kayako logo
SupportSuite, eSupport and LiveResponse Discussion, troubleshooting and feedback related to Kayako's flagship support desk products SupportSuite, eSupport and LiveResponse.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  (#1) Old
nume Offline
New Member
 
Posts: 9
Join Date: May 2005
Including PHP in templates - with SWIFT values as parameters - 14-02-2006, 09:34 AM

Hi,

I need to include a PHP script in some of our templates - in order to translate a username (fullname) into a value descriping the user.
Including and executing PHP in the template is not a problem - but including the SWITF username ($_USER[fullname]) as a GET parameter in the path for the PHP script is not possible. E.g. this does not work:
<?php include "example.php?user=<{$_USER[fullname]}>"; ?>

Any suggestions?

Best regards,

nume
   
Reply With Quote
  (#2) Old
nume Offline
New Member
 
Posts: 9
Join Date: May 2005
21-02-2006, 10:06 AM

or put differently...
Is it possible to access the template variables (like $_USER[fullname]) from PHP code embedded in a template?

--
nume
   
Reply With Quote
  (#3) Old
nume Offline
New Member
 
Posts: 9
Join Date: May 2005
21-02-2006, 11:20 AM

I need to use the variable within my PHP script to look up at user id.

Maybe I just need to know which includes are necessary? :-)

--
nume
   
Reply With Quote
  (#4) Old
trigxm Offline
New Member
 
Posts: 23
Join Date: Feb 2006
Location: Cheshire, UK
21-02-2006, 11:21 AM

Quote:
Originally Posted by nume
or put differently...
Is it possible to access the template variables (like $_USER[fullname]) from PHP code embedded in a template?

--
nume
Are you wanting to display the variable in your page or use it as another variable?

To test its working run

<? echo $_USER['fullname']; ?> that should echo the username back.. Bare in mind, you need to have all the includes called otherwise it wont work
   
Reply With Quote
Reply

Tags
parameters, php, swift, templates, values

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
GoPHP5 BigTom3007 Comments, Questions & Feedback 10 15-05-2008 09:10 AM
Setup PHP on a Windows 2000 server netFusion Technical Chat 5 03-10-2007 10:01 AM
dynamic php includes in smarty templates ebyte.com SupportSuite, eSupport and LiveResponse 3 04-06-2007 09:22 PM
Swift CLI problem joshopkins SupportSuite, eSupport and LiveResponse 2 02-09-2006 07:12 AM
New Versions. Just PHP changes or Templates too ? kropes SupportSuite, eSupport and LiveResponse 1 05-05-2006 01:04 AM



Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46