In a previous article I described in general terms how to use Joomla! logon security from iFrame'd (wrapper) pages. In this article I'll give specifics regarding integration with AppGini generated code. The following are quick notes to be elaborated on later...

These guidelines refer til code generated with AppGini version 3.4. Newer version include own logon system which makes integration more difficult.

  • all xxx_view.php programs must be referenced as wrapper pages in Joomla, and the access rights to these must be set using standard Joomla user categories
  • all xxx_view.php files needs to
    • retrieve passed parameter 'sessioncookie'
    • define JosAppG variable (as parent program)
    • add variable $JoomlaURL and initiate with the direct URL to the Joomla wrapper page showing Your php program
    • include jos_info.php to retrieve user info from jos_session table
    • control access right for different user / group / anunomyus and exit accordingly
  • all other .php files needs to
    • check JosAppG, and exit if undefined
  • datalist.php needs to
    • retrive sessioncookie from GET / POST vars (init of function 'render')
    • add $sessioncookie as new hidden field (around line 770)
  • separateDVTV.php needs to
    • refresh to $JoomlaURL after updating records
Beware!
The above works - but in case You use show detail in seperate page, there is no way to pass sessioncookie after update / insert / delete operations, as these force a REFRESH of pages.
Without extra precautions this will lead to error as the refresh happens inside the iFrame.... Frown

It was a major problem solving this one! Problem is You can not use 'Target=_top' in URL when doing a REFRESH in META statement used in AppGini code.
Thanks to this article 'Force Frame Breakout' I found out how to insert a line of javascript code to redirect out of the iFrame!

Comments powered by CComment