wcmsblog for phpwcms 1.3.3

well i’ve seen lot’s of people having problems with this and since i’m setting up a new phpwcms 1.3.3 and need blog support i’ll describe how i’m getting wcmsblog to run.

well after downloading from the site, looked at the contents of the archive. this includes:
include/
phpwcms_template/
scripts/
blogrss.php

the include directory and blogrss.php file can be moved into your phpwcms without any worries. notice that the new default directory for the templates does not have the “phpwcms_” prefix anymore! so move the containing files into the template folder of phpwcms.
now, i don’t like the idea of having even more javascripts laying around than there already are, but for making this easy, just copy the scripts folder with moo.fx and prototype over too. (i might change this since prototype and libraries similar to moo.fx are already laying around in phpwcms 1.3.3)

well on to the next step, now open phpwcms.php and at line 96 look for
case "modules": //modules

at line 105-106 the part for the graphical text mod is done, right below this add
$subnav .= subnavtext("Blogs", "phpwcms.php?do=modules&p=6", $p, "6", 0);
make sure you don’t have another module using the ID 6 or else change it.

and around line 403 ( since you’ve added a line or two it could be around 405 ;) ) after the graphical text mod part (ca. 408-410) add
if ($p == 6) { // Blog MOD
include_once "./include/inc_module/mod_blogs/main.inc.php";
}

NOTE: that the ID has to be the same as above if you changed it.

now if you log into phpwcms under modules you have a working version of the wcmsblog backend, hopefully!
the database is created the first time you enter the “Blogs” module.

if you are not using the GT mod, make sure you open the file blog.module.php in template/inc_script/frontend_render and look for
$s = preg_replace('/\{GT:(.+?)\}(.*?)\{\/GT\}/ei', "get_gt_by_style(\$gt, \"\$1\", \"\$2\")", $s); this should be around line 215.

here replace the line with an “if” to check if the gt mod classes exist, like this
if(class_exists('get_gt_by_style')) {
$s = preg_replace('/\{GT:(.+?)\}(.*?)\{\/GT\}/ei', "get_gt_by_style(\$gt, \"\$1\", \"\$2\")", $s);
}

if your GT mod is enabled and in use (added fonts and writable gt folder for images) you shouldn’t need to do this, but it’s needed if you don’t use the GT mod, just enabling in the config file doesn’t work!

now add the replacement tag to an article {BLOG:yourblogname} and it should show up in the frontend!

i’ll be showing you how to get the captcha working soon… if you have question feel free to ask!

3 thoughts on “wcmsblog for phpwcms 1.3.3

  1. Hallo Munzli,
    ich bin begeistert. Nachdem ich dein Tutorial Schritt für Schritt umgesetzt habe, habe ich endlich auch den Weblog unter phpwcms 1.3.3 zum Laufen gebracht. Was beim ersten Anlauf allerdings noch nicht geklappt hat, ist der Einbau in den phpwcms 1.3.5-Trunk vom 20.08.07. Evtl. hat es da wieder Veränderungen in den Dateien gegeben, so dass es wieder nicht passt. Kann man das Weblog-Script nicht so verändern, dass es die seit phpwcms 1.2.9 vorhandene Modulschnittstelle nutzt? Dann müßte man bei einer neuen Version keine Änderung im Code mehr vornehmen. Ich probiere weiter. Sollten meine Versuche von Erfolg gekrönt sein, melde ich mich wieder entsprechend.
    Gruß, Martin.

    P.S. Wie geht das jetzt dann eigentlich mit dem Captcha?

  2. Hallo Munzli,
    es ist soweit, ich hab’s doch tatsächlich geschafft, den Blog auch unter phpwcms 1.3.5pre (trunk 20.08.07) zum Laufen zu bringen. Hier ist der Beweis: http://mg888.ohost.de
    Das ist nun ein wahrer Fortschritt für phpwcms. Ich werde das auch im Forum noch schreiben. Vielen Dank, Munzli, für Deinen Beitrag dazu.
    Viele Grüße in die Schweiz,
    Martin

  3. Hallo munzli,
    vermutlich bist du ziemlich beschäftigt. Aber es wäre super, wenn Du den Einbau des captcha-System in den phpwcms-blog noch zeigen könntest. Du wolltest das noch machen, hast es aber leider nicht veröffentlicht.
    Viele Grüße,
    Martin

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.