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

Dynamic Plugins with P-CMS admin

Thread began 2/27/2011 7:25 pm by MikeH | Last modified 2/28/2011 5:29 am by Dave Buchholz | 1218 views | 3 replies |

MikeH

Dynamic Plugins with P-CMS admin

Hi
I have a P-CMS admin page created from the admin template, When I try to add a dynamic plugin I get a syntax error thrown in the Framwewrok code added.

Now I have also tried a dynamic plugin with a plain php page and no issues weird thing is the code is identiacl and no errors.

Is there something in the P.CMS admin that is incompatible?

Please note this is a dynamic polugin not a Static one which works fine.

Thanks

Mike

For this example the included page is a blank PHP page.

(Syntax error around Line 8)

php:
<?php
require_once( "../webassist/framework/library.php" );
require_once( 
"../webassist/framework/framework.php" );
?>
<?php 
require_once( "../WA_SecurityAssist/Helper_PHP.php" ); 
if(
true){
// WebAssist Framework Builder Dynamic Plug-in: $WA_gallery_test_2_1298852612389
 
switch(isset(action)?action:""){
  case 
"edit":
   
$WA_gallery_test_2_1298852612389 = new WA_Include("gallery_test_2.php");
   break;
  default:
   break;
 }
 if(isset(
$WA_gallery_test_2_1298852612389)){
  require(
$WA_gallery_test_2_1298852612389->BaseName);
  
$WA_gallery_test_2_1298852612389->Initialize(true);
 }
// End: WebAssist Framework Builder Dynamic Plug-in: $WA_gallery_test_2_1298852612389
}
 require_once( 
"../WA_Globals/WA_Globals.php" ); ?>
<?php 
require_once('../Connections/PowerCMSConnection.php'); ?>
<?php 
require_once( "../WA_CMS/WA_CMS.php" ); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/admin.dwt.php" codeOutsideHTMLIsLocked="false" -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title><?php echo($WAGLOBAL_Site_Name); ?> - [page]</title>
<!-- InstanceEndEditable -->
<style type="text/css" media="all">
@import url('css/admin.css');
</style>
<!--[if IE]>
<style type="text/css"> 
/* The proprietary zoom property gives IE the hasLayout property which addresses several bugs. */
#outerWrapper #contentWrapper #content {
  zoom: 1;
}
</style>
<![endif]-->
<!-- InstanceBeginEditable name="head" -->
<?php echo((isset($WA_gallery_test_2_1298852612389))?$WA_gallery_test_2_1298852612389->Head:""?>
<!-- InstanceEndEditable -->
<script type="text/javascript"  src="../js/mootools-core.js"></script>
<script type="text/javascript"  src="../js/mootools-more.js"></script>
<script type="text/javascript"  src="../CSSMenuWriter/cssmw/menu.js"></script>
<style type="text/css" media="all">
<!--
@import url("CSSMenuWriter/cssmw/menu.css");
-->
</style>
<!-- InstanceBeginEditable name="menu_ie" -->
<!--[if lte IE 6]>
<style type="text/css" media="all">
@import url("CSSMenuWriter/cssmw/menu_ie.css");
</style>
<style type="text/css" media="all">
@import url("css/admin_ie.css");
</style>
<style type="text/css" media="all">
img, div, ul, li, span, a {
  behavior: url("CSSMenuWriter/cssmw_images/iepngfix.htc");
}
</style>
<![endif]-->
<!-- InstanceEndEditable -->
</head>
<body>
<div id="outerWrapper">
  <div id="header">
   <div class="left">
     <a href="index.php"><img  src="../images/logo.png" alt="Content Management" /></a>
    </div>
    <div class="right"> 
      
 <a href="contents_search.php">Advanced Search</a> | <a href="users_login.php?logout=1">Log Out</a></div>
  </div>
  <div id="topNavigation">
     <div id="searchBox">
      <form  action="contents_results.php" method="get"  id="WADASearchForm">
       <p>
       <input type="text" name="S_Keyword" id="S_Keyword" value="" />
       <input type="submit" name="Search" id="Search" value="Search" alt="Search" class="btn" />
       </p>
    </form>
   
  </div>
    <?php require_once("../CSSMenuWriter/cssmw/menu.php"); ?>
  </div>
  <div id="contentWrapper"><!-- InstanceBeginEditable name="LeftColumn" -->
    <div id="leftColumn1">
      <?php require_once("pages.php"); ?>
    </div>
  <!-- InstanceEndEditable -->
    <div id="content">
      <!-- InstanceBeginEditable name="MainContent" -->   
      
      <?php echo((isset($WA_gallery_test_2_1298852612389))?$WA_gallery_test_2_1298852612389->Body:""?><!-- InstanceEndEditable -->
    </div>
  </div>
  
  <div id="footer">Powered by <a href="http://www.webassist.com/solutions"  title="PHP scripts" target="_blank">WebAssist</a>
</div>
</div>
</body>
<!-- InstanceEnd --></html>
Sign in to reply to this post

Dave BuchholzBeta Tester

Mike,

it's this part of the code that is causing the issue:

php:
switch(isset(action)?action:""){



action should be a url parameter i.e. $_GET['action'] or a variable i.e. $action or a recordset row value or anything else that is defined, action on it's own as you have it there is what is causing your syntax error

Sign in to reply to this post

MikeH

Hi Dave
Thanks for that my fault for assumming that by typeing action it would add it as $_GET['action'].

I did find though that it still messed up a couple of opening and closing or the <?php ?> tags but once I corrected those all works really well.

Thanks again for your help.

Mike

Sign in to reply to this post

Dave BuchholzBeta Tester

no worries

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