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

Add a PowerGallery 2 gallery to a Power CMS page

Thread began 10/27/2011 10:02 am by Rune Brynestad | Last modified 2/08/2012 10:14 am by Jason Byrnes | 2522 views | 5 replies |

Rune Brynestad

Add a PowerGallery 2 gallery to a Power CMS page

I want to add a gallery to a power cms page. I hav used the "Database Integration Update" from the Power Gallery 1 download page (Strange that this is not included in PowerGallery 2).

I have uploadad the wa_evaluate.php file from the PowerGalley 1 Database integration update to my site.

I have used this code in the CMS content area:
<input id="1" name="powergallery" theme="Av Moster" type="hidden" value="/kunder/totalweb.no/www/kunder/avmoster/gallery/galleries/grid_lightbox/index.php" />

and finally edit my output the cms content to

<?php require_once("wa_evaluate.php"); ?>
<?php echo wa_evaluate(WA_getCMSContent($database_PowerCMSConnection, $PowerCMSConnection, 'Costa Blanca - Orihuela Costa', 'Hoved')); ?>

On my page I have this error message:

Fatal error: Cannot redeclare wa_evaluate() in /kunder/totalweb.no/www/kunder/avmoster/wa_evaluate.php on line 2

You can see it on live URL here:
costablanca.php

I'm attaching my pages costablanca.php and wa_evaluate.php

Regards
Rune

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

Jason ByrnesWebAssist

remove this line:

<?php require_once("wa_evaluate.php"); ?>


the wa_evaluate function is already defined in another file and does not need to be re-declared.

Sign in to reply to this post

Rune Brynestad

It's displaying on the page now, but not in the way I want. Look at:
costablanca.php

and here is what should have been embedded:
index.php?gallery=1&theme=Av%20Moster

As you can see ther's also some notice and warnings on the costablanca.php page

Notice: Undefined variable: database_PowerStoreConnection in /kunder/totalweb.no/www/kunder/avmoster/WA_CMS/library.php on line 118

Warning: opendir(/kunder/totalweb.no/www/kunder/avmoster/WA_Globals/galleries/grid_lightbox/css/themes) [function.opendir]: failed to open dir: No such file or directory in /kunder/totalweb.no/www/kunder/avmoster/gallery/admin_gallery/common/functions.php on line 490

Notice: Undefined offset: 0 in /kunder/totalweb.no/www/kunder/avmoster/gallery/galleries/grid_lightbox/index.php on line 40

I'm uploading a new copy of the costablanca.php page

Thanks in advice.

Regards
Rune

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

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
supporthistory.php

If anyone else is experiencing this same issue, please append to this thread.

Sign in to reply to this post

JamieEff

Just found this thread and think that my post earlier today may be connected? showthread.php?p=119425#post119425

Sign in to reply to this post

Jason ByrnesWebAssist

in the other thread I sent you an updated copy of the admin_gallery/common/functions.php file that should correct the problem.

Sign in to reply to this post

JamieEff

Hey JAson

Am trying to get the following to be able to add to a PCMS editor

<?php
$pg_id = '3';
$pg_theme = 'Past Events';
include('/home/rallywb6/public_html/gallery/galleries/grid_lightbox/index.php');
?>



So far I have got:

<input id="1" name="powergallery" theme="Past Events" type="hidden" value="/home/rallywb6/public_html/gallery/galleries/grid_lightbox/index.php" />
<?php echo wa_evaluate(WA_getCMSContent($database_PowerCMSConnection, $PowerCMSConnection, 'xxx', 'xxx')); ?>



I am not sure what to put in the xxx as the information is being held in a table that isnt pcms......

Sign in to reply to this post

Jason ByrnesWebAssist

  as the information is being held in a table that isnt pcms  



??Do you mean a recordset?

if so, then use the recordset binding

Sign in to reply to this post

JamieEff

I have created this

<

div class="pastEventRHS">
<h2 style="margin-bottom:-20px;"><?php echo $row_Event['EventYear']; ?> Gallery</h2>
<?php echo $row_Event['Event Gallery']; ?>
</div>



And I want to allow my client to be abnle to add a gallery through an HTML editor in the back end but I dont knwo which bits to use where.....

Sign in to reply to this post

Jason ByrnesWebAssist

so, you use this code on the page to display the gallery?

php:
<?php echo $row_Event['Event Gallery']; ?>




to add the gallery in the back end, the user would add the following in code view of HTML Editor:

php:
<input id="1" name="powergallery" theme="Past Events" type="hidden" value="/home/rallywb6/public_html/gallery/galleries/grid_lightbox/index.php" />




then change the code to display the gallery:

php:
<?php echo $row_Event['Event Gallery']; ?>



to:

php:
<?php require_once("wa_evaluate.php"); ?>

<?php 
echo wa_evaluate($row_Event['Event Gallery']); ?>




NOTE: You may need to adjust the path to the wa_evaluate file.

Sign in to reply to this post
loading

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