close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues


Looks nice, multiple galleries to an end user?

Thread began 3/12/2010 9:37 am by CraigR | Last modified 3/15/2010 1:03 pm by CraigR | 991 views | 4 replies |

CraigRBeta Tester

Looks nice, multiple galleries to an end user?

I just bought powergallery, and i think it looks really nice, the installation was a breeze.

I have a photographer friend / client for whom this looks like a really good solution.
What i would like to do is give him the ability to add a new page with a gallery embedded, without any input from me, via an interface.

i can configure a 'content' page so that the menu is fed from a database, so links can be added to any new pages

how could i provide an 'add new page' facility ?

I looked at the PowerCMS documentation, but this seems to allow only content editing, but not page creation.

Sign in to reply to this post

Jason ByrnesWebAssist

Power CMS does not have the ability to create a new page automatically, you would need to hand code a script for creating the new page and add the gallery code to it.

I found the following tutorial through google:

this may be helpful for getting started with creating the new page.

Sign in to reply to this post

CraigRBeta Tester

great link

thanks for the url Jason, that gives me a great start...

now here's the $64000 question !

i have edited the script as below, passing in the appropriate html, as a string, line by line with line breaks,building it up slowly so as to recreate a blank page with the appropriate layout.

$filename = 'testnewpage.php';
$Content = "".'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">'."\r\n".
'<html xmlns="">'."\r\n".
'<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />'."\r\n".
'<title>Page Title</title>'."\r\n"."";

echo "open";
$handle = fopen($filename, 'x+');
echo " write";
fwrite($handle, $Content);
echo " close";


You get the idea.

is what i have achieved so far the best way to achieve my objective ?

thanks for your support

Sign in to reply to this post

Jason ByrnesWebAssist

that looks good, you would want to further modify $Content to build up the body of the page as well.

you could add a create page button to the admin section on the add to site page that will take the code for the gallery and automatically add it in.

Sign in to reply to this post

CraigRBeta Tester


Thanks Jason, i just wanted to check i was on the right lines.

As all of my gallery viewing pages will be based on the same recordset, what i have done so far is to use a php includes for the recordset code and just a few lines for the css import and everything in the <body> tags

i added the code to a dataassist 'insert new record' page, so i add a row to the appropriate table, populating the title tag fields and a few others, and create a standard gallery page which reads this data from the table.

i then use an update record page to insert the appropriate gallery code to my content.

early days, but looking good.

thanks for your help

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





Ease of use


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