Welcome to Geeklog, Anonymous Saturday, July 20 2024 @ 06:08 pm EDT

Geeklog Forums

Embed Gallery 1.2.5 into GeekLog 1.3.1



Okay, as promised, here is how to embed Gallery within GeekLog.

I tried to make it as simple as possible.

1. Install Gallery as per the directions in the INSTALL document included in the distribution.

2. Within config.php add the line: $GALLERY_EMBEDDED_INSIDE = "geeklog";

3. At the end of init.php, before the closing ?> add an include to the location of your lib-common.php for GeekLog, i.e. include_once("../lib-common.php");

4. In the gallery/html_wrap directory, copy the wrapper.header.default file and rename it wrapper.header (no .default). On line 42 of the new file, add the following code:
case "geeklog":
/* Display header and left blocks */

5. In the gallery/html_wrap directory, copy the wrapper.footer.default fiel and rename it wrapper.footer (no .default). On line 19 of the new file, add the following code:
case "geeklog":
/* Include right side blocks and footer */
if (!empty($_USER['uid']))
$result = DB_query("SELECT noboxes FROM WHERE uid = ''");
$U = DB_fetchArray($result);

# Display any blocks, polls, olderstuff configured for this page
if ($U['noboxes'] != 1)
$display .= '. '' . LB . COM_showBlocks('right',$topic) . '
' . LB;

// Get footer
$display .= COM_siteFooter();
// Output page
echo $display;

And that's it. Load up your gallery pages and they should all be wrapped by GeekLog.

This method is known to work with Gallery 1.2.5 and GeekLog 1.3.1. It may require changes to work with different versions.

See it in action at http://www.geekpal.com/gallery/

---John Holmes...



Sorry, but some of the HTML tags were stripped out of some of the code in step 5. The code should be the same as what's in index.php at the end of the file, near line 153 (on my file, at least). Sorry about the error. I'll try to post it here, we'll see how it comes out.
Text Formatted Code

    $display .= '</td><td><img src=' . $_CONF['site_url'] . '/images/speck.gif" height="1" width="10"></td>' . LB
        . '<td valign="top" width="180">' . LB . COM_showBlocks('right',$topic)
        . '<br><img src="' . $_CONF['site_url'] . '/images/speck.gif" width="180" height="1">' . LB;
---John Holmes...


Hi John, It looks as there's also a formatting error in the code of the DB_query. I haven't been able to deduce what it should read here. Greetings, Bas.

All times are EDT. The time is now 06:08 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content