This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use the new forum.
Home » plugins » General plug-ins » [nahoWikiPlugin] official topic (discuss, bugs, features request)
[nahoWikiPlugin] official topic (discuss, bugs, features request) [message #48447] Tue, 25 March 2008 09:55 Go to next message
naholyr  is currently offline naholyr
Messages: 223
Registered: June 2007
Faithful Member
I open this thread to create a dedicated discussion space for the plugin nahoWikiPlugin.

If you have any ideas, feedbacks or any comments concerning this plugin, please use this thread Smile

[Updated on: Mon, 14 April 2008 23:30]

Re: [discuss] nahoWikiPlugin - wiki plugin [message #49456 is a reply to message #48447 ] Tue, 08 April 2008 15:34 Go to previous messageGo to next message
sgrove  is currently offline sgrove
Messages: 2
Registered: April 2008
Junior Member
Hello!

The plugin looks quite nice. I read through the documentation though and it doesn't seem that it's possible to allow multiple wiki setups within the same project?

I was looking for a plugin that I would let me generate wikis very easily for individual users - how much reworking would this require with nahoWikiPlugin?

Thank you again for your work, it looks great.
Re: [discuss] nahoWikiPlugin - wiki plugin [message #49477 is a reply to message #48447 ] Tue, 08 April 2008 18:49 Go to previous messageGo to next message
naholyr  is currently offline naholyr
Messages: 223
Registered: June 2007
Faithful Member
This is an interesting feature. I don't think it'd require a lot reworking.


1. Schema

You should use sfPropelAlternativeSchemaPlugin to customize the schema, I would see something like this :
propel:
  _attributes:        { package: plugins.nahoWikiPlugin.lib.model }

  naho_wiki_wiki:
    id:               ~
    title:            { type: varchar(128), unique: true }
    # and any other information attached to a wiki instance

  naho_wiki_page:
    _attributes:      { phpName: nahoWikiPage }
    wiki_id:          { type: integer, foreignTable: naho_wiki_wiki, foreignReference: id, required: true }


This is the easiest way to attach every page to a single wiki.


2. Handle the wikis

Create a backend module to create/update/delete wikis


3. Select pages of the current wiki

Extend nahoWikiPagePeer::doSelectRS to automatically add a condition on nahoWikiPagePeer::WIKI_ID (if the request var is available), something like
class nahoWikiPagePeer extends PluginnahoWikiPagePeer
{

  public static function doSelectRS(Criteria $criteria, $con = null)
  {
    $request = sfContext::getInstance()->getRequest();
    if ($request->hasParameter('wiki_id')) {
      $criteria = clone $criteria;
      $criteria->add(nahoWikiPagePeer::WIKI_ID, $request->getParameter('wiki_id'));
    }
  }

}

It will automatically restrict any query done to "naho_wiki_page" to wikis with the ID = $_REQUEST['wiki_id'] (think about the way you want to implement this better).


4. Extend the module

Then you will have to overwrite the nahoWiki module's actions.class.php so that it accepts (and even requires) always a request parameter like "wiki_id" (or something else as you want, maybe more the title). I think you could put this in a preExecute method.


5. Generate correct internal links

The method to extend is PluginnahoWikiContentPeer::convertInternalLinks. The line you will want to modify is line 149 :
- $url = 'nahoWiki/view?page=' . $replace['name'];
+ $url = 'nahoWiki/view?wiki_id=' . $page->getWikiId() . '&page=' . $replace['name'];

This is a big copy-paste for a light change, so I will change this line by myself today :

- $url = 'nahoWiki/view?page=' . $replace['name'];
+ $url = nahoWikiPagePeer::url($page, $replace['name']);

So you will just have to extend the nahoWikiPagePeer::url method.


6. Helpers

You will have more work to make helpers updated : you will have to rewrite them all and add a "$wiki_id" parameter in each one.




That should be enough Wink

Use interwiki to authorize links between wikis hosted in your application.
Re: [discuss] nahoWikiPlugin - wiki plugin [message #49504 is a reply to message #48447 ] Wed, 09 April 2008 01:24 Go to previous messageGo to next message
sgrove  is currently offline sgrove
Messages: 2
Registered: April 2008
Junior Member
That seems like a bit of work, but like you said - nothing too difficult Smile

Do you think it'd be a good idea to just have this feature by default? Even if most people only used one wiki, it could still be just as easy to use, ignoring the functionality of multiple wikis in the meantime.

I'll try out those changes over the next couple of days, thank you.
Re: [discuss] nahoWikiPlugin - wiki plugin [message #49505 is a reply to message #49504 ] Wed, 09 April 2008 01:45 Go to previous messageGo to next message
weaverryan  is currently offline weaverryan
Messages: 781
Registered: November 2007
Location: Nashville, TN
Faithful Member

This looks very very nice. It appears that this will be the defacto wiki plugin for Symfony. I'll soon be using some wiki-related items, and I'd like to attach onto just one wiki plugin and get to know / extend it.

So, good timing! I still haven't looked in deeply, but it looks like this is a very well done option. I hope that you continue to support and update it (not that there's currently anything wrong with it - I just don't know! Razz )

So, thanks naholyr


Ryan Weaver
http://www.sympalphp.org
http://www.thatsquality.com
@weaverryan
Re: [discuss] nahoWikiPlugin - wiki plugin [message #49511 is a reply to message #49504 ] Wed, 09 April 2008 08:10 Go to previous messageGo to next message
naholyr  is currently offline naholyr
Messages: 223
Registered: June 2007
Faithful Member
Thanks for your feedback

weaverryan wrote on Wed, 09 April 2008 01:45

This looks very very nice. It appears that this will be the defacto wiki plugin for Symfony. I'll soon be using some wiki-related items, and I'd like to attach onto just one wiki plugin and get to know / extend it.

So, good timing! I still haven't looked in deeply, but it looks like this is a very well done option. I hope that you continue to support and update it (not that there's currently anything wrong with it - I just don't know! Razz )

It's difficult these days as work is hard, but I have published a few plugins and will maintain all of them. This is just like in every OS project : time is not guaranteed Laughing

sgrove wrote on Wed, 09 April 2008 01:24

That seems like a bit of work, but like you said - nothing too difficult Smile

Do you think it'd be a good idea to just have this feature by default? Even if most people only used one wiki, it could still be just as easy to use, ignoring the functionality of multiple wikis in the meantime.

I don't think this should be a default feature, because it adds a little overhead for something few people will use.
But this is an important enough feature to have a dedicated wiki page (as a detailed guide), or why not a branch in the SVN (i.e. you would just have to check out svn.symfony-project.com/plugins/nahoWikiPlugin/branches/mult iwiki to get it all Wink).

Quote:

I'll try out those changes over the next couple of days, thank you.

I'll do the change i said (about the URL-building process) today, so you can count on it if you're based on SVN trunk.

[Updated on: Wed, 09 April 2008 08:12]

Re: [discuss] nahoWikiPlugin - wiki plugin [message #49607 is a reply to message #48447 ] Wed, 09 April 2008 22:58 Go to previous messageGo to next message
naholyr  is currently offline naholyr
Messages: 223
Registered: June 2007
Faithful Member
@sgrove

Please checkout last changeset, I made some changes to ease extensibility :
- added a method nahoWikiPagePeer::url
- use this method every time we need an url to a wiki page (in helpers too)

So you can just override the ::url() method to add the wiki_id parameter in internal wiki links and helper links (point 5).
And you don't have to rewrite helpers at all (point 6).

There is still a need of refactoring in the templates to ease the integration of any new request parameter.
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #50005 is a reply to message #48447 ] Tue, 15 April 2008 14:54 Go to previous messageGo to next message
hiren  is currently offline hiren
Messages: 30
Registered: September 2006
Location: India
Member
Hello

Its a really great work.

can you please provide some more documentation that how it works and how can we customize it?
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #50021 is a reply to message #50005 ] Tue, 15 April 2008 17:40 Go to previous messageGo to next message
naholyr  is currently offline naholyr
Messages: 223
Registered: June 2007
Faithful Member
hiren wrote on Tue, 15 April 2008 14:54

can you please provide some more documentation that how it works and how can we customize it?

It's a tedious work, but I will, thanks to your questions Wink
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #51315 is a reply to message #48447 ] Sat, 03 May 2008 17:55 Go to previous messageGo to next message
mkranen  is currently offline mkranen
Messages: 2
Registered: February 2008
Junior Member
Thanks for this great plugin, it adds great functionality to Symfony and works really well!

In the Todo list you mentioned l18n support. I understand that you do not exactly know when this will be implemented but can you maybe give a rough estimation?
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #52667 is a reply to message #48447 ] Sun, 25 May 2008 19:57 Go to previous messageGo to next message
mgryszko  is currently offline mgryszko
Messages: 4
Registered: June 2006
Location: Madrid
Junior Member
Hi,

I've followed the installation instructions from the plugin wiki and I'm getting this error message:

[sfConfigurationException]

The module "nahoWiki" is not enabled.

stack trace

    * at ()
      in SF_SYMFONY_LIB_DIR\controller\sfController.class.php line 81 ...
              78.         $error = 'The module "%s" is not enabled.';
              79.         $error = sprintf($error, $moduleName);
              80.
              81.         throw new sfConfigurationException($error);
              82.       }
              83.
              84.       // one action per file or one file for all actions
    * at sfController->controllerExists('nahoWiki', 'index', 'action', '')
      in SF_SYMFONY_LIB_DIR\controller\sfController.class.php line 53 ...
              50.    */
              51.   public function actionExists($moduleName, $actionName)
              52.   {
              53.     return $this->controllerExists($moduleName, $actionName, 'action', false);
              54.   }
              55.
              56.   /**
    * at sfController->actionExists('nahoWiki', 'index')
      in SF_SYMFONY_LIB_DIR\controller\sfController.class.php line 196 ...
             193.     // check for a module generator config file
             194.     sfConfigCache::getInstance()->import(sfConfig::get('sf_app_module_dir_name').'/'.$moduleName.'/'.sfConfig::get('sf_app_module_config_dir_name').'/generator.yml', true, true);
             195.
             196.     if (!$this->actionExists($moduleName, $actionName))
             197.     {
             198.       // the requested action doesn't exist
             199.       if (sfConfig::get('sf_logging_enabled'))
    * at sfController->forward('nahoWiki', 'index')
      in SF_SYMFONY_LIB_DIR\controller\sfFrontWebController.class.php line 48 ...
              45.       $actionName = $request->getParameter('action');
              46.
              47.       // make the first request
              48.       $this->forward($moduleName, $actionName);
              49.     }
              50.     catch (sfException $e)
              51.     {
    * at sfFrontWebController->dispatch()
      in SF_ROOT_DIR\web\wiki_dev.php line 10 ...


The nahoWiki module is enabled in the settings.yml, all dependent plugins are installed. I'm accessing the nahoWiki using this URL: http://localhost/wiki_dev.php/nahoWiki

Do you have any quick idea what is wrong?

Best,

Marcin
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #52704 is a reply to message #48447 ] Mon, 26 May 2008 12:59 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
First of all, thanks naholyr for a great plugin, it looks really useful. Very Happy I'm considering using it to manage public-facing documentation on my current project, so it can be edited easily.

I'm on Windows Vista, Apache 2.2.4, PHP 5.2.4, Propel 1.3, eAccelerator and served via fcgid. I have a couple of questions/bugs regarding 0.1.1-beta (I've not checked out any recent subversion changes).

Firstly, I've been writing a page, and it has gone through several revisions. The content_ids in the revision table are ordered thus:

18, 19, 22, 25, 28, 31, 32, 34, 35, 38, 40, 42

Just for my understanding, is there a reason why these are not sequential?

Also, there are 14 rows in the revision table, but 44 rows in the content table - I would have though this was a 1:1 relationship? It seems that a number of content items have been 'orphaned'.

Lastly, I notice that copies of page text seem to be stored in both compressed and uncompressed formats (any reason why? Wink). In 13 of my 14 revision rows, they point to compressed rows (ie with a null uncompressed column) and the other points to an uncompressed row. This was working fine until recently, and now I get this error:

Quote:

Warning: gzinflate() expects parameter 1 to be string, resource given in C:\Program Files\Apache Software Foundation\Apache2.2\sites\corpconn\plugins\nahoWikiPlugin\l ib\model\plugin\PluginnahoWikiRevision.php on line 89

I have found that indeed Propel *is* supplying a resource and not a string when looking up column "gz_content". Oh dear - sudden brain wave - is this due to me using Propel 1.3, do you think?


Remember Palestine
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #52705 is a reply to message #48447 ] Mon, 26 May 2008 13:10 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
I almost forgot, there was another issue. Before the aforementioned error stopped things working, I found that doing a compare between any two previous versions wasn't correct. It got the latest revision correct, and thought that all previous revisions were empty (even though a glance at the database tables showed that they seem to have been recorded fine).

Any thoughts you can offer as to how to fix these issues shall be appreciated! Very Happy


Remember Palestine
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #52717 is a reply to message #52704 ] Mon, 26 May 2008 14:22 Go to previous messageGo to next message
naholyr  is currently offline naholyr
Messages: 223
Registered: June 2007
Faithful Member
halfer wrote on Mon, 26 May 2008 12:59

I'm on Windows Vista, Apache 2.2.4, PHP 5.2.4, Propel 1.3, eAccelerator and served via fcgid.


I think all the issues are related to this Wink
It's not tested at all with Propel 1.3 and I suppose the fact it uses a resource for blobs is a source for a lot of problems.
I can fix this particular point quite easily, I'll do and test with Propel 1.3 if I see other bugs.

Quote:

18, 19, 22, 25, 28, 31, 32, 34, 35, 38, 40, 42
Just for my understanding, is there a reason why these are not sequential?
They're supposed to be sequential :/

I can only suppose there had been problems when commiting changes because of Propel's version, I'll have to check this.

Quote:


Lastly, I notice that copies of page text seem to be stored in both compressed and uncompressed formats (any reason why? Wink). In 13 of my 14 revision rows, they point to compressed rows (ie with a null uncompressed column) and the other points to an uncompressed row. This was working fine until recently, and now I get this error:


The last revision of a page is stored uncompressed (with nothing in the blob), and all older revisions are stored compressed in the blob field.
That's for saving space, but more I think about and the more I have the feeling it would be easier with all uncompressed.

I muse make some statistics to convince myself ^^
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #52728 is a reply to message #48447 ] Mon, 26 May 2008 16:20 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Lovely, I look forward to whatever you come up with. If I can gather information from my system e.g. statistics or unit tests, do let me know.

As a clarification on the non-sequential nature of ids in the revision table, they *are* sequential in the content table, hence the orphaning of many of the rows in the latter. At a guess, where you are re-saving a previously current version as compressed, it is saving a new row rather than updating an old one?


Remember Palestine
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #52885 is a reply to message #48447 ] Wed, 28 May 2008 09:49 Go to previous messageGo to next message
hiren  is currently offline hiren
Messages: 30
Registered: September 2006
Location: India
Member
Hello..
I am also getting this error when tried the History feature of this plugin:

Warning: gzinflate() expects parameter 1 to be string, object given in

is any way so that if propel gives us the resource and we can convert it in the string?
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #52890 is a reply to message #48447 ] Wed, 28 May 2008 10:50 Go to previous messageGo to next message
hiren  is currently offline hiren
Messages: 30
Registered: September 2006
Location: India
Member
Hello..
I have tried to convert the object return by propel into string using getContents() method.

I have changed the public function getContent() of the file plugins\nahoWikiPlugin\lib\model\plugin\PluginnahoWikiRevisi on.php

Now the error is not coming. So please confirm it whether is it a suitable solution or not.
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #52896 is a reply to message #48447 ] Wed, 28 May 2008 11:54 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Quote:

I am also getting this error when tried the History feature of this plugin:

Warning: gzinflate() expects parameter 1 to be string, object given in

You mean exactly like the one I mentioned earlier? Wink

hiren, are you on Propel 1.2 (the one that comes with symfony) or 1.3 (the plugin)?


Remember Palestine
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #52903 is a reply to message #52896 ] Wed, 28 May 2008 12:29 Go to previous messageGo to next message
hiren  is currently offline hiren
Messages: 30
Registered: September 2006
Location: India
Member
Yes the error was the same. I am using the Propel 1.2 (the one that comes with symfony).
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #52908 is a reply to message #48447 ] Wed, 28 May 2008 12:39 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Aha, that will be of use to naholyr - we had previously both thought that it was Propel 1.3 at fault.


Remember Palestine
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #52911 is a reply to message #52908 ] Wed, 28 May 2008 12:44 Go to previous messageGo to next message
hiren  is currently offline hiren
Messages: 30
Registered: September 2006
Location: India
Member
Yes.. its the propel issue but not of the version. For BLOB, propel returns objects of type creole.util.Blob instead of the string. So we need to make it string.

Ref: http://propel.phpdb.org/docs/user_guide/chapters/ColumnTypes .html

FYR:
This is what I have changed in public function getContent() of the file nahoWikiPlugin\lib\model\plugin\PluginnahoWikiRevision.php


if(!$uncompressed_content)
$tmp = $compressed_content->getContents();
else
$tmp = $compressed_content;

return $uncompressed_content ? $uncompressed_content : gzinflate($tmp);

}

[Updated on: Wed, 28 May 2008 13:01]

Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #53196 is a reply to message #48447 ] Sat, 31 May 2008 17:27 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Thanks for that, though it doesn't work for me. I guess $compressed_content must be an object for you; for me, in Propel 1.3, it's a resource, and so this doesn't work. I'll put this bit of my project on hold for the time being and await naholyr's next version (no rush, naholyr!).


Remember Palestine
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #54687 is a reply to message #48447 ] Tue, 24 June 2008 12:36 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
Hi naholyr,

I certainly won't try to rush you, but have you had a chance to look at the bug here? I am some months away from going live so there's no urgency on my side, but would nevertheless like to use your plugin if I can Smile

[Updated on: Tue, 24 June 2008 12:37]


Remember Palestine
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #54744 is a reply to message #54687 ] Tue, 24 June 2008 21:30 Go to previous messageGo to next message
naholyr  is currently offline naholyr
Messages: 223
Registered: June 2007
Faithful Member
Although you don't want to rush (and I appreciate ^^), I'm the author and maintainer of this plugin so it's kinda my responsability Wink

I'll fix the issue this week-end (which is already a "no-life" week-end because of my job, I can handle a personal project on these hours Laughing )
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #54908 is a reply to message #48447 ] Thu, 26 June 2008 12:30 Go to previous messageGo to next message
halfer  is currently offline halfer
Messages: 9535
Registered: January 2006
Location: West Midlands, UK
Faithful Member
OK, so long as you give yourself *some* time off Very Happy

-- Many thanks!

[Updated on: Thu, 26 June 2008 12:30]


Remember Palestine
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #57091 is a reply to message #48447 ] Sat, 26 July 2008 13:06 Go to previous messageGo to next message
miguelSantirso  is currently offline miguelSantirso
Messages: 10
Registered: May 2008
Location: Oviedo, Spain
Junior Member
Hi,

I'm using this plugin in the project i'm working on now, and I've found it great! However, I have a couple of doubts:

- Is it possible to create an automatic index for a namespace?
- What is the best option to make a nahoWiki multilingual?

Thanks in advance
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #86419 is a reply to message #48447 ] Fri, 09 October 2009 11:50 Go to previous messageGo to next message
perco  is currently offline perco
Messages: 11
Registered: October 2009
Junior Member
Hello!

At first I want to say that this is a nice plugin for symfony.

But I still have some questions.

In my wiki only internal links are working. interwiki links doesn't work. When I try for instance in my wiki pages:
[[Google>wikipedia Search]]

This is not translated. Normal links like [[index]] are working.

Do I have to do some more adjustments in the config files? where has the interwiki.yml to be stored? in my app/config folder? Currently it is stored there. but it has no effect as I described before.

My next questition is about a real documentation for nahoWiki. Is there any reference avialible where I can get all formatting commands for wiki page creation?

One more question. I saw that there is a german translation availible for the wiki. How can I install it?

Thank you for your help!

[Updated on: Fri, 09 October 2009 11:51]

Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #86446 is a reply to message #86419 ] Fri, 09 October 2009 22:12 Go to previous messageGo to next message
naholyr  is currently offline naholyr
Messages: 223
Registered: June 2007
Faithful Member
perco wrote on Fri, 09 October 2009 11:50

At first I want to say that this is a nice plugin for symfony.
First I want to say a big thanks to you for your feedback, because I sometimes wonder if someone on Earth is using this plugin x]

I'll try to help you, hope you'll solve your issues !


Quote:

In my wiki only internal links are working. interwiki links doesn't work. When I try for instance in my wiki pages:
[[Google>wikipedia Search]]

I couldn't reproduce your issue :
  • I added /apps/frontend/config/interwiki.yml with this content:
    all:
      Google: http://www.google.com/search?q=
  • I could then well translate interwiki links :
    [[Google>wikipedia]]
    becomes
    [![Google](/sfPlugins_nahoWiki/web/nahoWikiPlugin/images/interwiki/google.gif) wikipedia](http://www.google.com/search?q=wikipedia)
    
    [[Google>wikipedia my text]]
    becomes
    [![Google](/sfPlugins_nahoWiki/web/nahoWikiPlugin/images/interwiki/google.gif) my text](http://www.google.com/search?q=wikipedia)
    
  • The translation is the one expected as defined in my app.yml :
    all:
      nahoWikiPlugin:
        interwiki_link_model:        "[![%alttext%](%image%) %title%](%link%)"
    This is the syntax for Markdown, whenever you use another rendering engine you should change this.


Quote:

My next questition is about a real documentation for nahoWiki. Is there any reference avialible where I can get all formatting commands for wiki page creation?

Well I could make a short documentation about nahoWiki-specific syntax, but as it only covers links, it would be very short.
In fact, you can use the rendering engine you want, and the syntax only depends on it ! You could also use no rendering engine at all and directly write HTML.

This is what happens if you didn't install sfMarkdownPlugin. To fully handle HTML you could use this in your app.yml to convert links to <a href> Wink
all:
  nahoWikiPlugin:
    internal_link_model:         '<a href="%link%">%title%</a>'
    internal_link_broken_model:  '<a href="%link%" title="Pas introuvable">%title%(?)</a>'
    interwiki_link_model:        '<a href="%link%"><img src="%image%" alt="%alttext%" /> %title%</a>'

Do you think this should be inserted in documentation ?


And if you want to use another rendering engine you just have to extend nahoWikiContentPeer::doConvert (which should be documented, I didn't check out).

My next big step on this plugin is to :
  • Embed a default Markdown rendering engine
  • Allow the configuration of a new rendering engine directly from the app.yml (for exemple you could set "app_nahoWikiPlugin_rendering_callback: [sfMarkdown, convert]"), still letting the actual behavior if you need more dynamic calls.

Because sfMarkdown is quite unmaintained, maybe dead.

To conclude, the only thing that nahoWiki really needs to handle by himself is links, as he needs to understand them to build the urls. This is why there is options to change the syntax of nahoWiki links and their conversion to engine links. That's the only thing I could document, the rest will be a simple link to Markdown documentation ^^

Quote:

One more question. I saw that there is a german translation availible for the wiki. How can I install it?

You have nothing to do, it's already in the i18n folder of the plugin. A simple $sf_user->setCulture('de') will do the trick.
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #86448 is a reply to message #57091 ] Fri, 09 October 2009 23:03 Go to previous messageGo to next message
naholyr  is currently offline naholyr
Messages: 223
Registered: June 2007
Faithful Member
Wow I've just seen I missed your message miguelSantirso, I'm sorry :/
I'll still answer anyway, it still can be useful who knows.

miguelSantirso wrote on Sat, 26 July 2008 13:06

- Is it possible to create an automatic index for a namespace?

This is not working like this for the moment, but I don't think it'd require a lot of work to extend the plugin to support this feature in your app : just extend executeBrowse() to limite the range of the tree to the parent namespace of the current page.
# Create: /apps/frontend/modules/nahoWiki/actions/actions.class.php

class nahoWikiActions extends BasenahoWikiActions
{
  
  protected function buildIndexTree(&$tree, $path, $fullpath, $expanded)
  {
    $base_namespace = $this->page->getNamespace();
    
    // Automatically expand to current namespace at initial call
    if ($expanded == array(''))
    {
      $expanded = explode(':', $base_namespace);
    }
    
    // Include only pages in current namespace (if defined)
    if (!$expanded || $path[0] == $expanded[0])
    {
      parent::buildIndexTree($tree, $path, $fullpath, $expanded);
    }
  }

}


Before :
http://ubuntu-pics.de/bild/26979/after_0Q6KG9.png

After :
http://ubuntu-pics.de/bild/26978/before_nD81HY.png

Quote:

- What is the best option to make a nahoWiki multilingual?

I'm still wondering about this one Sad
I studied some ways to do it, and none is easy and generic enough to be included in default package.
At first I was thinking about a configuration option to list available languages, a special marker to add the choice for languages version of a same page (like in Wikipedia). But to handle this nicely you'll have to handle a new parameter "language" and customize the model (on the same model of the code I proposed for the one who wanted multiple instances of wiki). The issue are always the same : what should I display when the default language is not available ? How to include this in simple links ? Should this be linked to user's culture ? How ? etc...

If you have managed to implement this in a nice way, I'd like to see your work !
Re: [nahoWikiPlugin] official topic (discuss, bugs, features request) [message #86461 is a reply to message #86446 ] Sat, 10 October 2009 14:43 Go to previous message
perco  is currently offline perco
Messages: 11
Registered: October 2009
Junior Member
Hello naholyr!

Thank you for your quick and detailed reply.

I wasn't able to solve my problems.

Maybe you can have a look at my config files:
1: /apps/myapp/config/app.yml:
all:
  nahoWikiPlugin:
    # General config
    start_page:             index         # Default start page
    pagename_format:        "a-z0-9\-_"   # Pagename authorized characters (format compatible with PCRE)
    ns_separator:           ":"           # Namespace separator character
    max_breadcrumbs:        5             # Maximum number of links stored in the breadcrumbs
    breadcrumbs_separator:  " ยป "         # Separator between breadcrumbs items
    include_breadcrumbs:    on            # Include breadcrumbs slot (disable if you include the slot in your layout) ?
    include_actions:        on            # Include actions list slot (disable if you include the slot in your layout) ?
    include_pagename:       on            # Display page's name when viewing content ?
    include_toc:            on            # Display Table of Contents at top of every page
    routes_register:        on            # Enable embedded routing rules ?
    wrap_class:             nahoWiki      # All pages are wrapped into a <div class="..."> tag. This is its class name.
    compress_old_revisions: on            # With this option enabled, old revisions are stored as gzip-compressed (saves space)

    # Rendering for internal links, you may need to customize the *_model options if you change rendering engine
    internal_links:             [%title%]]", "[[%name%]]"]("[[%name%)
    internal_link_model:        "[%title%](%link%)"
    internal_link_broken_model: "[%title%(?)](%link%)"
    interwiki_links:             [%title%]]", "[[%key%>%name%]]"]("[[%key%>%name%)
    interwiki_link_model:        "[![%alttext%](%image%) %title%](%link%)"

    # Regular expressions replacements *before* conversion
    replace_before:     []
      # - { from: "/a pcre mask/i", to: "something" }  # replace "a pcre mask" with "something"

    # Regular expressions replacements *after* conversion
    replace_after:     []
      # - { from: "/a pcre mask/i", to: "something" }  # replace "a pcre mask" with "something"

    # Strip some tags (and their contents) for security (this comes after conversion)
    strip_tags:  [embed, object](script,)

    # Permissions
    credentials_edit:      []           # Credentials required to be able to edit a page
    allow_anonymous_edit:  no           # Are anonymous (not authenticated) users able to edit a page ?

    # Long named namespaces
    namespaces:
      # Put here "human" names for your namespaces that will appear in breadcrumbs, for example :
      ns: NameSpace


2: /apps/myapp/config/interwiki.yml
all:
  PHP: "http://www.php.net/"

  AbbeNormal: "http://www.ourpla.net/cgi-bin/pikie.cgi?"
  AcadWiki: "http://xarch.tu-graz.ac.at/autocad/wiki/"
  Acronym: "http://www.acronymfinder.com/af-query.asp?String=exact&Acronym="
  Advogato: "http://www.advogato.org/"
  AIWiki: "http://www.ifi.unizh.ch/ailab/aiwiki/aiw.cgi?"
  ALife: "http://news.alife.org/wiki/index.php?"
  AndStuff: "http://andstuff.org/wiki.php?"
  Annotation: "http://bayle.stanford.edu/crit/nph-med.cgi/"
  AnnotationWiki: "http://www.seedwiki.com/page.cfm?wikiid=368&doc="
  AwarenessWiki: "http://taoriver.net/aware/"
  BenefitsWiki: "http://www.benefitslink.com/cgi-bin/wiki.cgi?"
  BridgesWiki: "http://c2.com/w2/bridges/"
  C2find: "http://c2.com/cgi/wiki?FindPage&value="
  Cache: "http://www.google.com/search?q=cache:"
  CLiki: "http://ww.telent.net/cliki/"
  CmWiki: "http://www.ourpla.net/cgi-bin/wiki.pl?"
  CreationMatters: "http://www.ourpla.net/cgi-bin/wiki.pl?"
  DejaNews: "http://www.deja.com/=dnc/getdoc.xp?AN="
  DeWikiPedia: "http://www.wikipedia.de/wiki.cgi?"
  Dictionary: "http://www.dict.org/bin/Dict?Database=*&Form=Dict1&Strategy=*&Query="
  DiveIntoOsx: "http://diveintoosx.org/"
  DocBook: "http://docbook.org/wiki/moin.cgi/"
  DolphinWiki: "http://www.object-arts.com/wiki/html/Dolphin/"
  EfnetCeeWiki: "http://purl.net/wiki/c/"
  EfnetCppWiki: "http://purl.net/wiki/cpp/"
  EfnetPythonWiki: "http://purl.net/wiki/python/"
  EfnetXmlWiki: "http://purl.net/wiki/xml/"
  EljWiki: "http://elj.sourceforge.net/phpwiki/index.php/"
  EmacsWiki: "http://www.emacswiki.org/cgi-bin/wiki.pl?"
  FinalEmpire: "http://final-empire.sourceforge.net/cgi-bin/wiki.pl?"
  Foldoc: "http://www.foldoc.org/foldoc/foldoc.cgi?"
  FoxWiki: "http://fox.wikis.com/wc.dll?Wiki~"
  FreeBSDman: "http://www.FreeBSD.org/cgi/man.cgi?apropos=1&query="
  Google: "http://www.google.com/search?q="
  GoogleGroups: "http://groups.google.com/groups?q="
  GreenCheese: "http://www.greencheese.org/"
  HammondWiki: "http://www.dairiki.org/HammondWiki/index.php3?"
  Haribeau: "http://wiki.haribeau.de/cgi-bin/wiki.pl?"
  IAWiki: "http://www.IAwiki.net/"
  IMDB: "http://us.imdb.com/Title?"
  JargonFile: "http://sunir.org/apps/meta.pl?wiki=JargonFile&redirect="
  JiniWiki: "http://www.cdegroot.com/cgi-bin/jini?"
  JspWiki: "http://www.ecyrd.com/JSPWiki/Wiki.jsp?page="
  KmWiki: "http://www.voght.com/cgi-bin/pywiki?"
  KnowHow: "http://www2.iro.umontreal.ca/~paquetse/cgi-bin/wiki.cgi?"
  LanifexWiki: "http://opt.lanifex.com/cgi-bin/wiki.pl?"
  LegoWiki: "http://www.object-arts.com/wiki/html/Lego-Robotics/"
  LinuxWiki: "http://www.linuxwiki.de/"
  LugKR: "http://lug-kr.sourceforge.net/cgi-bin/lugwiki.pl?"
  MathSongsWiki: "http://SeedWiki.com/page.cfm?wikiid=237&doc="
  MbTest: "http://www.usemod.com/cgi-bin/mbtest.pl?"
  MeatBall: "http://www.usemod.com/cgi-bin/mb.pl?"
  MetaWiki: "http://sunir.org/apps/meta.pl?"
  MetaWikiPedia: "http://meta.wikipedia.com/wiki/"
  MoinMoin: "http://purl.net/wiki/moin/"
  MuWeb: "http://www.dunstable.com/scripts/MuWebWeb?"
  NetVillage: "http://www.netbros.com/?"
  OpenWiki: "http://openwiki.com/?"
  OrgPatterns: "http://www.bell-labs.com/cgi-user/OrgPatterns/OrgPatterns?"
  PangalacticOrg: "http://www.pangalactic.org/Wiki/"
  PersonalTelco: "http://www.personaltelco.net/index.cgi/"
  PhpWiki: "http://phpwiki.sourceforge.net/phpwiki/"
  Pikie: "http://pikie.darktech.org/cgi/pikie?"
  PPR: "http://c2.com/cgi/wiki?"
  PurlNet: "http://purl.oclc.org/NET/"
  PythonInfo: "http://www.python.org/cgi-bin/moinmoin/"
  PythonWiki: "http://www.pythonwiki.de/"
  PyWiki: "http://www.voght.com/cgi-bin/pywiki?"
  SeaPig: "http://www.seapig.org/ "
  SeattleWireless: "http://seattlewireless.net/?"
  SenseisLibrary: "http://senseis.xmp.net/?"
  Shakti: "http://cgi.algonet.se/htbin/cgiwrap/pgd/ShaktiWiki/"
  SourceForge: "http://sourceforge.net/"
  Squeak: "http://minnow.cc.gatech.edu/squeak/"
  StrikiWiki: "http://ch.twi.tudelft.nl/~mostert/striki/teststriki.pl?"
  SVGWiki: "http://www.protocol7.com/svg-wiki/default.asp?"
  Tavi: "http://tavi.sourceforge.net/index.php?"
  TmNet: "http://www.technomanifestos.net/?"
  TMwiki: "http://www.EasyTopicMaps.com/?page="
  TWiki: "http://twiki.org/cgi-bin/view/"
  TwistedWiki: "http://purl.net/wiki/twisted/"
  Unreal: "http://wiki.beyondunreal.com/wiki/"
  UseMod: "http://www.usemod.com/cgi-bin/wiki.pl?"
  VisualWorks: "http://wiki.cs.uiuc.edu/VisualWorks/"
  WebDevWikiNL: "http://www.promo-it.nl/WebDevWiki/index.php?page="
  WebSeitzWiki: "http://webseitz.fluxent.com/wiki/"
  Why: "http://clublet.com/c/c/why?"
  Wiki: "http://c2.com/cgi/wiki?"
  WikiPedia: "http://www.wikipedia.com/wiki/"
  WikiWorld: "http://WikiWorld.com/wiki/index.php/"
  YpsiEyeball: "http://sknkwrks.dyndns.org:1957/writewiki/wiki.pl?"
  ZWiki: "http://www.zwiki.org/"


But these setting still don't have any effect on the wiki system.

When I use [[Google>wikipedia]] or [[Google>wikipedia my text]] it is still not converted.

What can I do?

With documentation I meant things like how to format text strings (bold, italic, underlined) or for headlines etc in wiki pages.

Quote:

You have nothing to do, it's already in the i18n folder of the plugin. A simple $sf_user->setCulture('de') will do the trick.

Sorry, but this doesn't work too. I set the Culture of the User to 'de' or to 'de_DE' but this also has no effect on the wiki. All instructions and the menu is still in English.

Greets!
Previous Topic:ckWebServicePlugin and endpoint
Next Topic:sfDoctrineGuard login page needs login
Goto Forum:
  

powered by FUDforum - copyright ©2001-2004 FUD Forum Bulletin Board Software