close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 or 2018 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Stop Plugins being viewed

Thread began 8/15/2010 9:01 am by Daryl | Last modified 8/16/2010 10:03 pm by Brad Lawryk | 1059 views | 8 replies |

DarylBeta Tester

Stop Plugins being viewed

Is there a way to stop people from being able to load a plugin seperately rather than its intended way, within a page?

Would security assist work in this case if applied to a plugin page or would it apply its page access to the complete page as well?

Sign in to reply to this post

Ray BorduinWebAssist

You could probably just set a variable on the page that contains the plugin, then add a check to plugin pages.

So if you were to add to the original page:

<?php
$includedOnPage = true;
?>

then you could include in each plugin:

<?php
if (!isset($includedOnPage)) die();
?>

That would prevent the plugin from being viewed directly.

Sign in to reply to this post

Russell CollinsBeta Tester

Wouldn't you use the "show if" utility function in framework based on the users security level setting ?

Russ

Sign in to reply to this post

anonymous

I would agree with Russell on this... simply set the user level in a session variable and then show if that variable is equal to the desired level.

Sign in to reply to this post

Ray BorduinWebAssist

That would work to make sure someone logged in first, but you could still view the plugin page outside of context since the session would still exist.

Sign in to reply to this post

victor278184

<?php
if (!isset($includedOnPage)) die();
?>

is also concept use by many CMS including joomle... this is the best approach..

for integration with session.. i think it's the a good wishlist for dot release

Sign in to reply to this post

Brad Lawryk

Originally Said By: victor278184
  <?php
if (!isset($includedOnPage)) die();
?>

is also concept use by many CMS including joomle... this is the best approach..

for integration with session.. i think it's the a good wishlist for dot release  



Is all you have to do is copy this code into the page that gets included? If so, does it matter where? I assume just at the top of the code would be fine?

Brad

EDIT: Actually I just tried it and it works amazing. Thats a very handy bit of code.

Sign in to reply to this post

Brad Lawryk

Originally Said By: victor278184
  <?php
if (!isset($includedOnPage)) die();
?>

is also concept use by many CMS including joomle... this is the best approach..

for integration with session.. i think it's the a good wishlist for dot release  




oops, actually this doesn't work .... even when it is included in the page it still dies. The whole page that it is being inserted into dies.

Brad

Sign in to reply to this post

Brad Lawryk

Originally Said By: Brad Lawryk
  oops, actually this doesn't work .... even when it is included in the page it still dies. The whole page that it is being inserted into dies.

Brad  



Ignore ... really bad day. This works awesome. Thanks for the code, Ray.

Brad

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...