EmbeddedGallery-Talk
This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.
Comments
Question:
I'm trying to get this working here (http://www.hogbay.com/gallery/) on my website. If you visit that url you'll see that Gallery is embedded, but pmwiki is throwing lots of errors that look like this:
My line 392 is in the FmtPageName function and looks like this:
$fmt = preg_replace(array_keys($FmtP
),array_values($FmtP
),$fmt);
Does anyone have ideas on why that would be? Could it be because I don't have the proper values in register_globals.php file? I coudln't figure out how to print out the values from the $GLOBALS array. Whenever I printed things out I just seemed to get values of globals, not their names.
Also what is PMWIKI_BASE_DIR supposed to look like? My pmwiki.php index file is named index.php and is located in the htdocs folder. The only way that I could make things work was by using this value:
$PMWIKI_BASE_DIR = "/www/h/hogbay/htdocs";
Is that the right way to do things? Or can I specify a more local path?
Answer
To fix all the errors showing up on your pages try editing your php.ini file that is in the same directory (or parent directory) of your PmWiki installation. If you do not have a php.ini file then grab one from the net somewhere for your providers Php version and put it at the highest level of your webspace. Edit the line that named error_reporting to turn off showing warnings. This should get rid of all these nasty warnings you are getting.
PMWIKI_BASE_DIR is just the location of where your PmWiki installation is located. If you have changed your pmwiki.php to be named index.php then you will have to edit the software I have provided to load the PmWiki software using that name. I suggest that instead of renaming pmwiki.php to index.php to looking setting up mod_rewrite or at least just having index.php be symbolic link to pmwiki.php.
I have been trying to use this plugin recently and hit a few problems along the way. Here is what I have found so far, with the help of JamesMcDuffie:
- register_globals.php is missing 3 variables (maybe more, but these are the ones I have noticed) - $UserInstanceVars, $LoginButton and $CopyrightNotice.
$SkinDirUrl
does not seem to work in the pmwiki template, so you will need to specify the full path (used for css tag)- $LoginButton does not seem to work, either - so you will need to either go back to the main wiki site to login/logout or create the login/logout link manually. (The former is inconvienent, the latter is ugly because both buttons show all the time.) Or... you can figure out how to get $LoginButton set properly. :-)
Also, make sure to set $EMBEDDED_GALLERY_INSIDE as well as $EMBEDDED_GALLERY_INSIDE_TYPE in gallery/config.php - or else you will get the Gallery output at the top of the page and the PmWiki output at the bottom of the page (with some errors in between).
This was done with PmWiki 2.0beta36 and Gallery 1.4.4-pl6.
I have just finished getting PMWiki (version 2.1.beta14) with Gallery (version 1.5.1) using this plugin. Here are my tips:
- I had to add the following to the register_globals.php file:
- global
$VersionNum
; - global
$MessagesFmt
; - global $EnablePost;
- global $ChangeSummary;
- global
$CookiePrefix
; - global
$SiteGroup
; - global $Charset;
- global $LoginButton;
- global $CopyrightNotice;
- global $UserInstanceVars;
- global $AuthCascade;
- global $AuthList;
- global
- I confirm stormspotter's observation that
$SkinDirUrl
doesn't work in the pmwiki template, so you have to manually put the full path to the CSS files in the template. - I tried to get auth working with the UserAuth module. I could log in to the wiki, but it wasn't working in Gallery. Turns out that gallery was registering its own session name, which prevented the pmwiki session vars (including the username) from being seen. I edited .../gallery/session.php and commented out the line that switched session names: session_name('GallerySession'); And now pmwiki and gallery share a session, including auth info.
I haven't messed around with administrating the galleries much; I'll post more if there are other tricks.
Talk page for the EmbeddedGallery recipe (users?).