Viewing 15 replies - 1 through 15 (of 15 total)
  • As always, Good job! I am yet to take a serious look at it, but I sure hope you can take away the function wherein visitors can edit the page.

    Thread Starter Laughinglizard

    (@laughinglizard)

    Thank you and the edit features can very easily be turned off. Look through the MODIFICATIONS section where the “edit links” can be turned on or off.
    πŸ™‚

    Cool. (more of a bump really) πŸ™‚

    Thread Starter Laughinglizard

    (@laughinglizard)

    I have shown you my way of using this page. I would really appreciate examples of how people are using this hack. The community and people wanting to use this could really benefit from that.

    This is a great hack! I’ve checked it on my testpage and everything seems to work like i expected it 😎

    Three cheers for LaughingLizard! Hip-hip- Hooray! Hip-hip- Hooray! Hip-hip- Hooray!
    That wiki rocks! I jsut got it installed on my test site at home, and after tweaking it around, it’s almost just what I need! Now I just need to tweak it a little more, then upload it and Whahoo!
    TG

    UPDATE: In the off chance that any one wants to implement WP security to the wiki, here’s how you go about it.
    In your main wiki php file, right after the line:
    require_once(‘wp-blog-header.php’);
    Add the following:
    get_currentuserinfo();
    Then in the ewkiki.php file, on the second line, add this:
    global $user_level;
    Next, find where “EWIKI_CONTROL_LINE” is DEFINED, roughly, line 51. Change it to read as follows:
    if($user_level>=X) { # X is the minimum level for editing the wiki. This will keep unwanted changes from happening.
    define("EWIKI_CONTROL_LINE", 1); # EditThisPage-link at bottom
    }else{
    define("EWIKI_CONTROL_LINE", 0); # EditThisPage-link at bottom
    }

    Change the X to the minimum user level needed to edit the wiki.
    Save it all. That’s it. Now users with a level of X or greater will be able to edit the wiki, and keep the wiki spam down.
    TG

    Ah, screw it… don’t use that last hack …. this one is better….

    if(defined("EWIKI_FORCESECURITY")){
    if(EWIKI_FORCESECURITY==1){
    if($user_level>=9) { # 9 is the minimum level for editing the wiki. This will keep unwanted changes from happening.
    define("EWIKI_CONTROL_LINE", 1); # EditThisPage-link at bottom
    }else{
    define("EWIKI_CONTROL_LINE", 0); # No EditThisPage-link at bottom
    }
    }else{
    define("EWIKI_CONTROL_LINE", 1); # EditThisPage-link at bottom
    }
    }else{
    define("EWIKI_CONTROL_LINE", 0); # No EditThisPage-link at bottom
    }

    It’s a bit more complicated, but tighter in that if you implement multiple wikis, like I just did, you can control which wiki(s) users get to edit and which ones they don’t.
    In your main wiki page (aboutme.php in LL’s example), jsut before the
    include("ewiki-about.php"); line, add this:
    define("EWIKI_FORCESECURITY","1"); // Use this inside of ewiki.php to determine if security should be used.
    Set it to 1 to enforce WP user admin security…. Set it to 0 to allow open access to the wiki…. or comment out the line completely to allow no editing of the wiki at all (by any one).
    To see this in action, visit my site and click on the About Me link in the menu. That will take you to a locked wiki. Then click on the “Discussion WhiteBoard” link right below it. That will take you to an open wiki.
    TG

    OK, I found a “bug” in the ewiki.php file.
    Line 3278 reads as follows:
    $sql2 .= $a . "'" . mysql_escape_string($value) . "'";
    It should be
    $sql2 .= $a . "'" . mysql_escape_string(stripslashes($value)) . "'";
    If you get \ in front of all your ‘ and ” when you edit a wiki page, this is the answer to that.
    TG

    I’m trying to install this wiki thing, but all that I have is a message saying: “table ewiki already exists ewiki error: could not read from directory.
    But since the message don’t include the mentioned directory, I can’t check if exists or no, or create it manually.
    Can anyone please help me?
    Diego

    Thread Starter Laughinglizard

    (@laughinglizard)

    That just means that your install is complete. Close your browser window, clear your cache and cookies and try viewing the page again.

    It’s working now! Thanks!!

    anatman

    (@anatman)

    LL, i tried installing the wiki, but there is a problem i bumped into:
    – the “preview” breaks down WP. you can see it on your aboutme.php, try clicking the preview button: a lot of sql errors appear, from wp-blog-headres.php;
    Do you know how to fix that?
    Thanks,
    Eduardo

    wow…what was that post about?
    I thought the new version of WP was going to make it easy to create static pages? I installed the latest nightly…not sure I see where or how a static page is created. I’m overlooking something I’m sure?

    [2 huge spams deleted]

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Wiki / Static Pages hack for WordPress’ is closed to new replies.