Welcome to Geeklog Tuesday, October 24 2017 @ 12:12 am EDT


Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/2002
Posts: 13073
Location:Stuttgart, Germany

After installing the static pages plugin I found that it didn't integrate too well into Geeklog since it doesn't use the block design like normal articles do. So I changed it to wrap the static content into a block. You can download my replacement for the index.php that goes into public_html/staticpages. This file also fixes a minor HTML error where the center tag wasn't closed depending on which type of user was viewing the static page.

But wait, there's more: When checking my Apache logs, I found that the plugin was trying to access a staticpage.gif file that wasn't included in the original archive. Putting a GIF into public_html/staticpages/images/staticpage.gif solves this.

And finally, since I am working on a German page right now, I've also translated the lang.php that comes with the plugin to German.

You can get a repackaged plugin containing all the above modifications from here. Please note that it installs the English lang.php by default. If you want German, you have to rename the included lang_ger.php to lang.php after the installation went through.

Have fun.

bye, Dirk


Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/2002
Posts: 13073
Location:Stuttgart, Germany
Okay, two bugs have emerged after using this for a while. The first one was pointed out to me by Jerry Rocteur (thanks): The static pages icon does not show up in admin/moderation.php (this also happens with Tony's original static pages plugin). The problem is in the function plugin_cclabel_staticpages() in functions.inc. This function returns only two strings (instead of three) and these two are also in the wrong order. Here's a fixed version: function plugin_cclabel_staticpages() { global $_CONF, $LANG_STATIC; return array($LANG_STATIC['staticpages'], $_CONF['site_url'] . '/admin/plugins/staticpages/index.php', $_CONF['site_url'] . '/staticpages/images/staticpage.gif'); } This correction also displays the localized name of the plugin (in case you use lang_ger.php or made you own translation). The second problem is only with the German translation: You can't delete static pages. The problem is that the German word for "delete" is "Löschen" (with an o-Umlaut) which doesn't work with the switch statement in admin/index.php. So for now, I changed the translation to "Loeschen" and that seems to works. You can use the link from the original article to get an updated version of the plugin. Have fun. bye, Dirk

Status: offline

rocteur

Forum User
Newbie
Registered: 10/02/2002
Posts: 6
Thanks Dirk, that fixed it..

Thanks for all the effort you're putting into this!!!

Jerry


Status: offline

amckay

Forum User
Full Member
Registered: 23/03/2002
Posts: 180
Dirk, I downloaded your version of this plugin but there are no install instructions included with it. Danke, -alan

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/2002
Posts: 13073
Location:Stuttgart, Germany

This version of the static pages plugin is designed to be used with the web based install that was built into Geeklog up until (and including) version 1.3.3. If you're running a newer version, you should really download and use Tony's version of the plugin (from the Plug-ins page).

bye, Dirk


All times are EDT. The time is now 12:12 am.

  • 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