Add a Gallery using Power CMS
Is there a way that you can add a gallery using power cms, as I want my clients to be able to add there own galleries without asking me to enter the code to the page thanks Alistair
Is there a way that you can add a gallery using power cms, as I want my clients to be able to add there own galleries without asking me to enter the code to the page thanks Alistair
Yes, this is possible.
See the Database Integration Update on the Power Gallery Download center page.
I Have had a look at that but dosent make much sense to me in my page I only have:
<div id="gallery">
<?php
$pg_id = '3';
$pg_theme = 'light';
include('/var/www/vhosts/canopiesuk.com/httpdocs/gallery/galleries/ribbon_lightbox/index.php');
?>
</div>
so don't see where I need to wrap the code in the help file. What I want the client to be able to do is create a new gallery and then copy the add to site code from power gallery go to there site admin in power cms and paste the code onto a page and the gallery be added.
Is this how it will work or am I missing something
In the power gallery Add to Site page, there is the section titled Add to Power Store, copy this code and paste it to the Power CMS Content area.
The wa_evaluate function will get wrapped around the echo of the Power CMS Developer notes.
for example, my developer notes will look like:
<?php
include('/Applications/MAMP/htdocs/pcms_211/WA_CMS/addtosite.php');
echo WA_getCMSContent($database_PowerCMSConnection, $PowerCMSConnection, 'Content', 'Content Area', false);
?>
I would need to edit that to:
<?php require_once('wa_evaluate.php'); ?>
<?php
include('/Applications/MAMP/htdocs/pcms_211/WA_CMS/addtosite.php');
echo wa_evaluate(WA_getCMSContent($database_PowerCMSConnection, $PowerCMSConnection, 'Content', 'Content Area', false));
?>
OK your add to site page is different to mine as when I click add to site the add to power store say add to power store 3 and the code is as below:
<input type="hidden" name="powergallery" id="1" theme="light" value="/var/www/vhosts/canopiesuk.com/httpdocs/gallery/galleries/ribbon_lightbox/index.php" />
see screen grab attached
Just too add I am using CMS V 1 not 2
Yes, that is the power gallery add to site code that you will past into the Power CMS Content Area.
The code example I give above is the Power CMS Developer notes code.
It is the Power CMS developer notes code that needs to be modified with the wa_evaluate function.
Not the Power Gallery Add to Site Code.
The user will only need to create the gallery, then copy the Power Store Add to Site Code into the Power Gallery content artea, they do not need to modify anything.
You as the developer, need to modify the Power CMS deleper notes code that will display the Power CMS Content area in the web site to use the wa_evaluate function.
Sorry Jason Think I know where were at now although you might say different:
I have set up a test page see:
http:gallerytest.php
The page still isnt showing the gallery after I have pasted the code in if you view page source code it is all there so what am I doing wrong now Thanks Alistair
sorry it not all showing its ignoring the php code the actual page source is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Gallery Test</title>
</head>
<body>
<div style="width:1024px; height:200px; border:1px #666 solid; margin: 20px 0 0 20px; padding:20px;">
<?php require_once('wa_evaluate.php'); ?>
<?php
include('/var/www/vhosts/canopiesuk.com/httpdocs/WA_CMS/addtosite.php');
echo wa_evaluate(WA_getCMSContent($database_localhost, $localhost, 'gallery test' , 'test'));
?>
</div>
</body>
</html>
please send a screen shot showing what you entered for the gallery test->test content area.
make sure you adding the power store add to site code, and that you click the source button in the toolbar before pasting the code.
Sorry Jason I used the wrong code I have now used the power store add to site code and we have progress the gallery is now visible but there are no images see
gallerytest.php
here is an updated copy of the galleries/global.php and webassist/framework/library.php file that should correct the issue.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
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.