Not logged in. · Lost password · Register
Page:  1  2  next 

All posts by dokufan66 (18)

topic: Automated links to existing pages  in the forum: General Help and Support Plugins
Avatar
dokufan66 #1
User title: dokuwiki fan
Member since Sep 2011 · 18 posts
Group memberships: Members
Show profile · Link to this post
That's actually a good suggestion, at least to a point.

I have see other Wiki's like veryquickwiki that automatically link CamelCase terms.

What I haven't seen is any going OCD and converting all terms that have an article into a link. Having spaces in page names will wreak havoc on any attempts.

I don't know if a plug-in for this already exists.
topic: alternate editor per user (Can we use fchkg, etc., just for users who need it?)  in the forum: General Help and Support Plugins
Avatar
dokufan66 #2
User title: dokuwiki fan
Member since Sep 2011 · 18 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 41122
Actually that's not a terrible workaround! I'll run it by my users.

Thanks for the quick response.
topic: Back link list?  in the forum: General Help and Support Plugins Plugin Wishlist
Avatar
dokufan66 #3
User title: dokuwiki fan
Member since Sep 2011 · 18 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 38351
I would also like a handly backlink feature. I previously had a veryquickwiki server and it was nice to see what pages linked to the current one. The advantage is that you can navigated backwards through the wiki structure without having to tag all your pages or add crosslinks across all your pages.
topic: alternate editor per user (Can we use fchkg, etc., just for users who need it?)  in the forum: General Help and Support Plugins
Avatar
dokufan66 #4
User title: dokuwiki fan
Member since Sep 2011 · 18 posts
Group memberships: Members
Show profile · Link to this post
Subject: alternate editor per user
I have a good number of people editing my dokuwiki. To get some hold-outs to start editing pages, I would like to offer a more WYSIWYG kind of editor.

I have fckglite running on a test docuwiki.

This is a crazy question, but is there a way to enable alternative editors just for the users who need them? The existing users are fine with the built-in editor.
topic: How to Delete Multiple Pages? (Need a way to prune wiki pages.)  in the forum: General Help and Support Features and Functionality
Avatar
dokufan66 #5
User title: dokuwiki fan
Member since Sep 2011 · 18 posts
Group memberships: Members
Show profile · Link to this post
If you want an incredibly difficult way, you could do it with XML-RPC. You can get a list of all the files in a namespace (dokuwiki.getPagelist) then save an empty page for each (wiki.putPage). You can get a list of all media (wiki.getAttachments) then delete them (wiki.deleteAttachment). If it's in use, the delete will fail.

https://www.dokuwiki.org/devel:xmlrpc

I agree this functionality in general should be on the roadmap, a namespace management config tool. I have multiple namespaces, over a dozen users,  hundreds of pages and hundreds of media files. I also use XML-RPC and scripts to check in source code files to the wiki.

In the meantime, as for cleaning up old media files, you might try the plugin unusedmedias (I haven't tried yet).
https://www.dokuwiki.org/plugin:unusedmedias

Sample PHP functions to manipulate a namespace (Print your own web UI, "are you sure?" prompts, validation. Don't forget your ACLs restrict your RPC calls from touching protected namespaces. WARNING DokuWiki will parse nested namespaces, so if you mean nuke your root namespace, all the sub-namespaces will go too. But that's what "revert" is for :) )

include('/usr/lib64/php/xmlrpc.inc');
include('../wiki/conf/local.php');
function listfiles($strNamespace) {
  $c = new xmlrpc_client('/wiki/lib/exe/xmlrpc.php', 'localhost');
  // dont validate certicate anyways
  $c->setSSLVerifyPeer(0);
  // create the XML message to send
  $m = new xmlrpcmsg('dokuwiki.getPagelist');
  $m->addParam(new xmlrpcval($strNamespace));
  $m->addParam(new xmlrpcval(array()));
  // send the message and wait for response
  $r = $c->send($m, 5, 'https');
  // did we fail? die!
  if($r == false) die('error');
  // if we got an error, the page did not save!
  if($r->faultCode()){
    $output = "<p>we got an error trying to read namespace: $strNamespace</p>\n";
    $output .= "<p>" . $r->faultCode() . "=" . $r->faultString() . "</p>\n";
    echo $output;
    return false;
  } else {
    echo "<h1>namespace: $namespace</h1>\n";
    $v = php_xmlrpc_decode($r->value());
    foreach ($v as $value) {
      $output .="<pre>" . $value['id'] . "</pre>\n";
    }
  }
  return $output;
}
function listfilesarray($strNamespace) {
  $aryReturn = array();
  $c = new xmlrpc_client('/wiki/lib/exe/xmlrpc.php', 'localhost');
  // dont validate certicate anyways
  $c->setSSLVerifyPeer(0);
  // create the XML message to send
  $m = new xmlrpcmsg('dokuwiki.getPagelist');
  $m->addParam(new xmlrpcval($strNamespace));
  $m->addParam(new xmlrpcval(array()));
  // send the message and wait for response
  $r = $c->send($m, 5, 'https');
  // did we fail? die!
  if($r == false) die('error');
  // if we got an error, the page did not save!
  if($r->faultCode()){
    $output = "<p>we got an error trying to read namespace: $strNamespace</p>\n";
    $output .= "<p>" . $r->faultCode() . "=" . $r->faultString() . "</p>\n";
    echo $output;
    return false;
  } else {
    $v = php_xmlrpc_decode($r->value());
    foreach ($v as $value) {
      array_push($aryReturn, $value['id']);
    }
  }
  return $aryReturn;
}
function savetxt($strArticle,$strText) {
  $c = new xmlrpc_client('/wiki/lib/exe/xmlrpc.php', 'localhost');
  // dont validate certicate anyways
  $c->setSSLVerifyPeer(0);
  // create the XML message to send
  $m = new xmlrpcmsg('wiki.putPage');
  $m->addParam(new xmlrpcval($strArticle));
  $m->addParam(new xmlrpcval($strText));
  $m->addParam(new xmlrpcval(array("sum" => new xmlrpcval("Created programatically")),"struct"));
  // send the message and wait for response
  $r = $c->send($m, 5, 'https');
  // did we fail? die!
  if($r == false) die('error');
  // if we got an error, the page did not save!
  if($r->faultCode()){
    $output = "<p>we got an error trying to save: $strArticle</p>\n";
    $output .= "<p>" . $r->faultCode() . "=" . $r->faultString() . "</p>\n";
    echo $output;
    return false;
  } else {
    return true;
  }
}

function delpage($strArticle) {
  return savetxt($strArticle,'');
}
function delnamespace($strNamespace) {
  $files = listfilesarray($strNamespace);
  foreach ($files as $page) {
    $ret = delpage($page);
  }
}
This post was edited 2 times, last on 2012-11-08, 17:33 by dokufan66.
Edit reason: missing paren
topic: Check if pages being edited before upgrading (display a list of page locks so i know when it's save to upgrade wiki)  in the forum: General Help and Support Features and Functionality
Avatar
dokufan66 #6
User title: dokuwiki fan
Member since Sep 2011 · 18 posts
Group memberships: Members
Show profile · Link to this post
Subject: Check if pages being edited before upgrading
I use wiki/.htaccess with rewrite to redirect users a maintenance page while I'm upgrading the dokuwiki code.

Now that many more people are using my wikis, I would like to be sure there are no current page locks before I go and update everything. Is there an existing way to list all the page locks/user activity for a wiki?

Thanks
topic: Including information only visible to administrators (Display information (status, for example) for wiki administrators)  in the forum: General Help and Support Features and Functionality
Avatar
dokufan66 #7
User title: dokuwiki fan
Member since Sep 2011 · 18 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 27953
Thank you very much for the replies. I will try them out!
topic: Including information only visible to administrators (Display information (status, for example) for wiki administrators)  in the forum: General Help and Support Features and Functionality
Avatar
dokufan66 #8
User title: dokuwiki fan
Member since Sep 2011 · 18 posts
Group memberships: Members
Show profile · Link to this post
Subject: Including information only visible to administrators
I currently have scripts to backup my wiki and sync the backups to another server via ftp/sftp/scp. I can put the current backup status on my start page using PHP or HTML to insert any images that is dynamically created by a PHP script (GD is fun to use). For example, a Red X, an Orange ? or a Green Checkmark.

I would like the custom content to only display for the administrator.

One option would be to update the data/cache/message.txt file every hour.

Are there any other ideas where to put information on every page that is only included if the logged in user is an administrator?

Thanks.
topic: programatically create pages? (Is there a way to properly create pages in the wiki?)  in the forum: General Help and Support Syntax and Usage
Avatar
dokufan66 #9
User title: dokuwiki fan
Member since Sep 2011 · 18 posts
Group memberships: Members
Show profile · Link to this post
I solved the problem I had getting the error message:
-32602=server error. wrong number of method parameters

I played a lot with the the parameters endlessly while looking at examples in the Synch plugin (https://github.com/splitbrain/dokuwiki-plugin-sync/blob/50…) and the documentation (http://www.dokuwiki.org/devel:xmlrpc#wikiputpage).

Here is the code I got to work. Hopefully it saves somebody some time:

Code:
<?php
include('/usr/lib64/php/xmlrpc.inc');

function savetxt($strArticle,$strText) {
  $sum = "Created programatically";
  $c = new xmlrpc_client('/wiki/lib/exe/xmlrpc.php', 'localhost');
  // dont validate certicate anyways
  $c->setSSLVerifyPeer(0);
  // create the XML message to send
  $m = new xmlrpcmsg('wiki.putPage');
  $m->addParam(new xmlrpcval($strArticle));
  $m->addParam(new xmlrpcval($strText));
  $m->addParam(new xmlrpcval(array("sum" => new xmlrpcval($sum)),"struct"));
  echo "<p>debug: about to send the xmlrpcmessage</p>\n";
  // send the message and wait for response
  $r = $c->send($m, 5, 'https');
  // did we fail? die!
  if($r == false) {
    echo "<p>debug: die</p>\n";
    die('error');
  } else {
    echo "<p>debug: ok we did not die</p>\n";
  }
  // if got an error, the page did not save!
  if($r->faultCode()){
    $output = "<p>we got an error trying to save: $strArticle</p>\n";
    $output .= "<p>" . $r->faultCode() . "=" . $r->faultString() . "</p>\n";
    echo $output;
    return false;
  } else {
    return true;
  }
}

$result = savetxt('test:page',"this is a test");
if ($result) {
  echo "<p>i think it worked</p>\n";
} else {
  echo "<p>we failed</p>\n";
}
?>
This post was edited on 2011-10-13, 21:20 by dokufan66.
topic: Creating clean dump or deleting history of existing Wiki  in the forum: General Help and Support General Stuff
Avatar
dokufan66 #10
User title: dokuwiki fan
Member since Sep 2011 · 18 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 27020
That is a too-familiar scenario. I suggest leaving 1 user account, give them that user's password, give it rights: admin, user

To easily remove password information and you are using local authentication, edit the file:

conf/users.auth.php

Best of luck to you
topic: Displaying Permission Denied after succesfull login  in the forum: General Help and Support Plugins
Avatar
dokufan66 #11
User title: dokuwiki fan
Member since Sep 2011 · 18 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 27246
Hello,
I don't use Mantis (the bug tracking software, right?) but recently did an AD integration for Windows.

Is this your start page that won't display, and do you have any ACLs set?

Are you using groups or usernames in your ACLs? Groups can be funny things. "My_Team" (and "My Team", too, I believe) turns into "@My%5fTeam" for DokuWiki.

Good luck; sounds like a great pair, bug tracking and documentation.
topic: Alternative to Apache on OSX / private server  in the forum: General Help and Support Server Setup
Avatar
dokufan66 #12
User title: dokuwiki fan
Member since Sep 2011 · 18 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 27126
Ever tried using MAMP? (http://www.mamp.info) There are bundles for Apache/MySQL/PHP out there for Windows, Mac, etc.

Also check out the bitnami dokuwiki stacks. Mac is there too.

If you can, please post back what you finally went with. I for one, would like to know, even though I only run my wikis on Windows, Solaris and Linux.
topic: programatically create pages? (Is there a way to properly create pages in the wiki?)  in the forum: General Help and Support Syntax and Usage
Avatar
dokufan66 #13
User title: dokuwiki fan
Member since Sep 2011 · 18 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 27025
Thanks, I will check it out.
topic: Update DokuWiki  in the forum: General Help and Support Installation and Configuration
Avatar
dokufan66 #14
User title: dokuwiki fan
Member since Sep 2011 · 18 posts
Group memberships: Members
Show profile · Link to this post
In reply to post ID 27245
This would be great time to write a script to back up your wiki! I am not a huge fan of the backup tool, and do my backups with Linux commands. NOTE this does NOT cover MySQL, etc. databases.

Basically you want to do this:

cd /var/path/to/
tar czf /var/wikibackupdir/wikibackup-20110106.tgz wiki/

then to restore it on the new machine

cd /var/path/to
tar xzf /var/wikibackupdir/wikibackup-20110106.tgz

I wrote a script to run as a cronjob to back up the entire wiki ("/var/path/to/wiki/") weekly, and a "lite" version to back up "/var/path/to/wiki/data/pages/" daily. Use date in your filenames and you're good.

Try restoring to another computer (like using Uniform server on a windows laptop) if you'd like before you finally wipe an reload.

Good luck!
topic: programatically create pages? (Is there a way to properly create pages in the wiki?)  in the forum: General Help and Support Syntax and Usage
Avatar
dokufan66 #15
User title: dokuwiki fan
Member since Sep 2011 · 18 posts
Group memberships: Members
Show profile · Link to this post
Here is the first key to regain sanity when you are trying to run XML-RPC over SSL (on a self-signed server) using the methods on <url>http://www.dokuwiki.org/devel:xmlrpc</url>:
$c->setSSLVerifyPeer(0);

Once you have the dokuwiki.getVersion example working, the next key is getting your parameters working:
$m = new xmlrpcmsg('wiki.getPageHTML',array(new xmlrpcval('start')));

Right now I'm up to the next insanity point,
Fault code 1=You are not allowed to read this page

This is because I don't give any permissions to "all' on my wiki. It works if I give permissions to "all". In the meantime I will use a separate namespace with permissions to "all" to test with. Ideally I would like to be able to specify a user or group to use for permissions when accessing and adding pages to the DW via XML-RPC. This could give the XML-RPC link permission to access only certain namespaces or pages, not depending on "all" access.
This post was edited 4 times, last on 2011-09-21, 20:30 by dokufan66.
Close Smaller – Larger + Reply to this post:
Special characters:
Page:  1  2  next 
Special queries
Go to forum
Imprint
This board is powered by the Unclassified NewsBoard software, 20150713-dev, © 2003-2015 by Yves Goergen
Current time: 2019-10-16, 07:43:03 (UTC +02:00)