We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

is it passable to use Global Variables in plugin parameters

Development and Programming

Max Lazar's avatar
Max Lazar
337 posts
16 years ago
Max Lazar's avatar Max Lazar

is it passable to use Global Variables in plugin parameters? Like

{exp:plugin username="{logged_in_screen_name}"}

?

       
silenz's avatar
silenz
1,648 posts
16 years ago
silenz's avatar silenz

I think so. If in doubt, just try it? 😉

       
Max Lazar's avatar
Max Lazar
337 posts
16 years ago
Max Lazar's avatar Max Lazar

I tested it and it doesn’t work :( but may be I don’t know something or setup EE incorrect. Of course if it’s not working direct way, I can make internal function for processing tag data like $session->userdata[$tag_data] for this, but more better if it can be done without this 😊..

       
Yuri's avatar
Yuri
273 posts
16 years ago
Yuri's avatar Yuri

I have the same problem I supply {logged_in_screen_name} as parameter, but in the plugin I get the string ‘{logged_in_screen_name}’ rather then variable’s value. Can anyone assist me on this?

       
Yuri's avatar
Yuri
273 posts
16 years ago
Yuri's avatar Yuri

I did this:

if ($subject_id=="{member_id}"||$subject_id=="{logged_in_member_id}") 
      {
      global $SESS;
      $subject_id = $SESS->userdata['member_id'];  
    }

however I’m sure there’s more proper way.

       
Max Lazar's avatar
Max Lazar
337 posts
16 years ago
Max Lazar's avatar Max Lazar

yes, I decide this issue the same way - add tag global=”on/off” and if it “on” the plugin check tags on global variables range with $SESS.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.