close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

SecurityAssist Show Region Server Behavior on a CSS Menu Writer menu ?

Thread began 2/09/2010 12:14 pm by Rune Brynestad | Last modified 2/12/2010 6:01 pm by Eric Mittman | 2066 views | 5 replies |

Rune Brynestad

SecurityAssist Show Region Server Behavior on a CSS Menu Writer menu ?

I have a page containing a CSS menu Writer Menu with a "Log In" and "Log Out" button. I want to use the SecurityAssist Show Region Server Behavior so that the "Log In" button shows only when the user is not logged in, and the "Log Out" button shows only when the user is logged in.

Where should I put the SecurityAssist Show Region Server Behavior ?

I have tryed to put it on the CSSMenuWriter\cssmw\menu.php page like this:

<ul class="level-0" id="cssmw">
<li><a href="<?php echo($assumedRoot); ?>index.php">Home Page</a></li>
<?php if(!WA_Auth_RulePasses("Logged in to users")){ // Begin Show Region ?>
<li><a href="<?php echo($assumedRoot); ?>users_LogIn.php">Log In</a></li>
<?php } // End Show Region ?>
<?php if(WA_Auth_RulePasses("Logged in to users")){ // Begin Show Region ?>
<li><a href="<?php echo($assumedRoot); ?>users_LogOut.php">Log Out</a></li>
<?php } // End Show Region ?>
</ul>

but when I do, the content on my page is not showing.

Any ideas on where I should put the SecurityAssist Show Region Server Behavior ?

I'm attaching my files.

Thanks in advice.

Regards
Rune

Attached Files
Test.zip
Sign in to reply to this post

Eric Mittman

The way you have this setup seems like it should work. Are you getting any errors on the page? When you say that the content does not show are you getting a blank white page? If so you may need to add some code to display errors on the page. Try putting this on the top of the page:

php:
<?php

error_reporting
(E_ALL);
ini_set('display_errors','on');
?>



Please let us know the result you are getting with this and if you have a link where we can see the problem that would also be helpful.

Sign in to reply to this post

Rune Brynestad

No errors on my page, just a blank white page.

When I put the code

<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
?>

I get this error:

PHP Warning: require_once(../../WA_SecurityAssist/Helper_PHP.php) [function.require-once]: failed to open stream: No such file or directory in F:\home\ssfintra.no\www\Test\CSSMenuWriter\cssmw\menu.php on line 1 PHP Fatal error: require_once() [function.require]: Failed opening required '../../WA_SecurityAssist/Helper_PHP.php' (include_path='.;C:\php5\pear') in F:\home\ssfintra.no\www\Test\CSSMenuWriter\cssmw\menu.php on line 1

Live URL here:

index.php

Source code here:

Test.zip

Thanks again for looking into this issue.

Regards
Rune

Sign in to reply to this post

Eric Mittman

It seems that the problem is the require once line of code that you have for the helper file. There are two things that I think you could do to resolve this, you can try adding this include to the page with the menu on it.

If that does not work you will need to adjust the path to this include on the menu.php page. You should try removing the ../../ in front of it so that it looks like this:

php:
<?php require_once( "WA_SecurityAssist/Helper_PHP.php" ); ?>



I think that one of these or both should give you the correct result.

Sign in to reply to this post

Rune Brynestad

It's working!

Removing the ../../ on the menu.php page was enough. No need to include the helper file to the page with the menu on it.

Thanks again for your support.

Regards
Rune

Sign in to reply to this post

Eric Mittman

Glad to hear that, it seems that php treats includes on included pages as starting from the location of the main script that is executing it rather than the relative position of the include file.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...