A new one with a couple of frontend tweaks:
http://www.opinz.co.uk
cheers,
jsw_nz(john)
http://www.opinz.co.uk (almost done)
Hi Brans,
Well the client wanted to protect an area of the site, namely the properties listing page. They wanted end-users to register and then get an email to activate their account. So the question was how to protect this particular section. What I ended up doing was placing a short line of code in the page template for this section: this went at the top of the main content area:
The $_SESSION['OPINZ_Member'] was set only upon activation of an account, (or subsequent login) so basically it did a page redirect to index.php?login if they were not registered. This is a considerably simplified approach, but does work, at least with respect to the client's requirements. There was an additional post, that took a more thorough approach to this issue, which I find quite interesting, that can be found here:
http://www.phpwcms.de/forum/viewtopic.php?t=3506
Email This Page:
I handled this operation within the Flash menu itself, so basically I needed to pass the the current page URL as a parameter using FlashVars. The code looks something like this (object tags only - embed tags would be similar) :
The main parameter to detemine the page was derived from concatenating the server NAME and server URI:
Then I appended this string adding "http://". Addtionally I passed the {PAGETITLE}, and if the user was logged in...their name, username and email, which automatically got filled in from within Flash. The use of session variables is enabled by uncommenting line 34 of index.php:
Right Panels
The two right panels 'news' and 'featured' are flash-based as well and take the wcms summary sections fo these two articles and clean up the code. It ends up as a simplified version of html (which Flash supports), including the <a href> tag. So the news section could have multiple article links (delimited by a pipe '|'), which was split and then animated inside Flash....and the featured section being similar, could also load a jpg, that was generated by wcms. In order to load it I needed take the string returned by wcms:
and clean up this code using Flash's string methods so that it would return:
which could be loaded using the loadMovie() method.
Hope this all makes sense.
All best,
jsw_nz(john)
Well the client wanted to protect an area of the site, namely the properties listing page. They wanted end-users to register and then get an email to activate their account. So the question was how to protect this particular section. What I ended up doing was placing a short line of code in the page template for this section: this went at the top of the main content area:
Code: Select all
[PHP]if(!isset($_SESSION['OPINZ_Member'])){
header ("location: http://www.opinz.co.uk/index.php?login");
exit;}[/PHP]
http://www.phpwcms.de/forum/viewtopic.php?t=3506
Email This Page:
I handled this operation within the Flash menu itself, so basically I needed to pass the the current page URL as a parameter using FlashVars. The code looks something like this (object tags only - embed tags would be similar) :
Code: Select all
<param name=FlashVars value="pageTitle={PAGETITLE}&user=[PHP]echo $_SESSION['OPINZ_User'];[/PHP]&name=[PHP]echo $_SESSION['OPINZ_Name'];[/PHP]&email=[PHP]echo $_SESSION['OPINZ_Email'];[/PHP]&this_URL=[PHP]echo $_SERVER['SERVER_NAME'];echo $_SERVER['REQUEST_URI'];[/PHP]">
Code: Select all
this_URL=[PHP]echo $_SERVER['SERVER_NAME'];echo $_SERVER['REQUEST_URI'];
Code: Select all
session_start();
The two right panels 'news' and 'featured' are flash-based as well and take the wcms summary sections fo these two articles and clean up the code. It ends up as a simplified version of html (which Flash supports), including the <a href> tag. So the news section could have multiple article links (delimited by a pipe '|'), which was split and then animated inside Flash....and the featured section being similar, could also load a jpg, that was generated by wcms. In order to load it I needed take the string returned by wcms:
Code: Select all
&myImage=<img src="content/images/1_18_D2O6j8TRa0-160x.jpg" border="0" alt="">'>
Code: Select all
content/images/1_18_D2O6j8TRa0-160x.jpg
Hope this all makes sense.
All best,
jsw_nz(john)