• Payment Plugins Poll

    We need your feedback on the need for updated payment plugins. Please go here and give us your feedback.

  • Joomla 5.1

    For running J!5.1 you must install Fabrik 4.1
    See also Announcements

  • Subscription and download (Fabrik 4.1 for J!4.2+ and J!5.1) are working now

    See Announcement
    Please post subscription questions and issues here

    We have resolved the issue with the J! updater and this will be fixed in the next release.

  • Update & Changlog URL Fixer

    At the present time the update site URL for Fabrik is incorrect in all installations up to and including 4.1. This will be corrected in 4.2, however, if you wish to update Fabrik via the J! Updater you can download and install this plugin.

    This file is installed just like any other extension through the J! Extension Installation panel. It will not however actually install anything. Its sole purpose is to fix the Update Site and Changlog URL's. Once done it will simply exit.

    As always, we recommend you perform a site backup priot to installation.

[solved]{$my->id} wouldn't compare

aijosh

Member
Hello,

I'm editing a custom detail view and want to show a div only to logged in users.
I can see the values returned if I echo them
(0 when not logged in)
but The problem is that the value returned doesn't work in my if statement.
PHP:
 <?php
                         $loggedin =  '{$my->id}';
$loggedin =  (string)$loggedin;
          if ($loggedin ==  "0"){
                             echo '<div> You must be logged in to see this</div><a class="btn btn-mini btn-primary" href="/login">Login</a>';
         }?>

I tried comparing logged in users id with itself and it still doesn't work.
 
Placeholders only work in "evaled" code, ie. code snippets you directly enter in a field in the Fabrik backend, where Fabrik will then run that snippet through our placeholder replacement before doing an "eval($code)". For straight up PHP files, it won't work, as we don't "eval" those, we just use PHP's require/include to directly execute the files. We don't read the file content in and eval it.

-- hugh
 
Back
Top