Page 1 of 1

http://www.opinz.co.uk (almost done)

Posted: Thu 23. Sep 2004, 07:42
by jsw_nz
A new one with a couple of frontend tweaks:

http://www.opinz.co.uk

cheers,
jsw_nz(john)

Posted: Thu 23. Sep 2004, 10:58
by brans
what frontend tweaks are you talking about ? could you give us a list what you tweaked and where we can see the result ?

ok I see the flash menu... I'd love to see how you realised the "Email this Page" part of your site..

Posted: Thu 23. Sep 2004, 19:44
by jsw_nz
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:

Code: Select all

[PHP]if(!isset($_SESSION['OPINZ_Member'])){ 
header ("location: http://www.opinz.co.uk/index.php?login"); 
exit;}[/PHP]
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) :

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]">
The main parameter to detemine the page was derived from concatenating the server NAME and server URI:

Code: Select all

this_URL=[PHP]echo $_SERVER['SERVER_NAME'];echo $_SERVER['REQUEST_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:

Code: Select all

session_start();
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:

Code: Select all

&myImage=<img src="content/images/1_18_D2O6j8TRa0-160x.jpg" border="0" alt="">'>
and clean up this code using Flash's string methods so that it would return:

Code: Select all

content/images/1_18_D2O6j8TRa0-160x.jpg
which could be loaded using the loadMovie() method.

Hope this all makes sense.
All best,
jsw_nz(john)

Posted: Mon 27. Sep 2004, 20:23
by vello
very good work

Posted: Thu 21. Apr 2005, 13:58
by cchhita
Wow! that is a great use of Phpwcms! That site looks great!!
How did you create the flash menu? Did you create this yourself from scratch?

If clients want a nice clean design, I will have to point them to your site to show them that what a FREE content manager is capable of!

Posted: Thu 21. Apr 2005, 16:11
by brans
the flash menu was built using fcms:
--...--/index.php/topic,27.0.html