MyBB Community Forums

Full Version: MyBB Wiki
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9
Just made a translation of the main messages to brazilian portuguese:

Quote:<?php

/* --- General --- */
$l['wiki'] = "Wiki";
$l['wiki_breadcrumb'] = "Lista de Artigos";
$l['wiki_filter'] = "Filtrar Artigos";
$l['wiki_revisions'] = "Revisões";
$l['original'] = "Original";
$l['current'] = "Atual";
$l['categories'] = "Categorias";
$l['notes'] = "Bloco de notas";
$l['contributors'] = "Contribuíram para {1}";
$l['wiki_contributors'] = "Contribuíram";
/* --- Error Messages --- */
$l['oops'] = "O Wiki foi desabilitado!";
$l['invalid_article'] = "Nenhum artigo existe com este id.";
$l['identical'] = "Os dois artigos são idênticos!";
$l['noarticles'] = "Não há artigos nesta wiki. <a href=\"wiki.php?action=new\">Por que não cria um?</a>";
$l['noarticles_guest'] = "Não há artigos neste wiki.";
$l['notupdated'] = "Devido a um erro interno, a sua edição não foi publicada.";
$l['notposted'] = "Devido a um erro interno , o seu artigo não foi publicado.";
$l['protected'] = "Este artigo foi protegido para evitar abusos.";
$l['doesntexist'] = "Esse artigo não existe!";
$l['pickarticle'] = "Você deve escolher um artigo!";
$l['notprotected'] = "Um erro interno do servidor impediu a proteção deste artigo.";
$l['protected2'] = "Este artigo foi protegido para prevenir abusos e portanto não pode ser editado.";
$l['nocategory'] = "Você deve escolher uma categoria!";
$l['notitle'] = "Nenhum título foi especificado";
$l['nomessage'] = "Não há nenhuma mensagem!";
$l['errorsocc'] = "Ocorreram os seguintes erros:<br />{1}";
$l['nocat'] = "Você deve especificar o título de uma categoria para filtrar.";
$l['noarticlescat'] = "Não há artigos nesta categoria.";
/* --- Buttons and Options --- */
$l['title'] = "Título do Artigo";
$l['content'] = "Conteúdo do Artigo";
$l['category'] = "Categoria do Artigo";
$l['new'] = "Novo Artigo";
$l['post'] = "Postar Artigo";
$l['edit'] = "Editar Artigo";
$l['editing'] = "Editandon {1}";
$l['lastpost'] = "Último Editor";
$l['protect'] = "Artigo Protegido";
$l['export'] = "Exportar Artigos";
/* --- Who's Online --- */
$l['viewing_wiki'] = "Visualizando o Wiki";
$l['wiki_new'] = "Criando um novo Artigo do Wiki";
$l['wiki_edit'] = "Editando um Artigo do Wiki";
/* --- Redirects --- */
$l['wasprotected'] = "Você protegeu o artigo com sucesso. Redirecionando você agora de volta para o artigo.";
$l['posted'] = "O artigo foi publicado. Redirecionando você agora para o índice do wiki.";

?>

As I am the admin and have no issue with english (and it is already 5:37am), I will leave the admin translation to another time Smile

Didn't start too well:


Quote:Fatal error: Call to undefined method DirectoryIterator::getExtension() in /home/[use]/[domain]/[mybb_folder]/inc/plugins/wiki.php on line 136

On the 136 line we have:
Quote:if(!$file->isDot() && !$file->isDir() && $file->getExtension() == 'html')

I read here it might be a PHP version incompatibility, my server has a 5.2.17 PHP

http://stackoverflow.com/questions/85080...on-version

Should I follow the suggestion on the stackoverflow link? Would I have more problems with this PHP version?

I found now here that you already made a commit with the change:
https://github.com/Seabody/MyBB-Wiki/com...dd9f0774ae

The thing is that I downloaded from GIT, using the Download ZIP button. Should I had done differently?

Just found another problem:
Quote:Fatal error: require_once() [function.require]: Failed opening required '/home/neworder/antinovaordemmundial.com/mybb/inc/plugins/wiki/markdown/Markdown.php' (include_path='.:/usr/share/pear/') in /home/neworder/antinovaordemmundial.com/mybb/wiki.php on line 146

I had a look and the file I had in the server started with lowercase, which I changed to what it was complaining (Markdown) and it seems to fix it. Is it a known problem?

Oh well, just another problem, which I remember have seen when I was upgrading another plugin to 1.6.11:

Fatal error: Class 'Horde_Text_Diff_Renderer' not found in /home/neworder/antinovaordemmundial.com/mybb/inc/3rdparty/diff/Diff/Renderer/Inline.php on line 22

Thanks for the help
Eco
(2013-11-05, 07:40 AM)blogantinom Wrote: [ -> ]Just made a translation of the main messages to brazilian portuguese:

[...]

Didn't start too well:


Quote:Fatal error: Call to undefined method DirectoryIterator::getExtension() in /home/[use]/[domain]/[mybb_folder]/inc/plugins/wiki.php on line 136

On the 136 line we have:
Quote:if(!$file->isDot() && !$file->isDir() && $file->getExtension() == 'html')

I read here it might be a PHP version incompatibility, my server has a 5.2.17 PHP

http://stackoverflow.com/questions/85080...on-version

Should I follow the suggestion on the stackoverflow link? Would I have more problems with this PHP version?

I found now here that you already made a commit with the change:
https://github.com/Seabody/MyBB-Wiki/com...dd9f0774ae

The thing is that I downloaded from GIT, using the Download ZIP button. Should I had done differently?

Just found another problem:
Quote:Fatal error: require_once() [function.require]: Failed opening required '/home/neworder/antinovaordemmundial.com/mybb/inc/plugins/wiki/markdown/Markdown.php' (include_path='.:/usr/share/pear/') in /home/neworder/antinovaordemmundial.com/mybb/wiki.php on line 146

I had a look and the file I had in the server started with lowercase, which I changed to what it was complaining (Markdown) and it seems to fix it. Is it a known problem?

Oh well, just another problem, which I remember have seen when I was upgrading another plugin to 1.6.11:

Fatal error: Class 'Horde_Text_Diff_Renderer' not found in /home/neworder/antinovaordemmundial.com/mybb/inc/3rdparty/diff/Diff/Renderer/Inline.php on line 22

Thanks for the help
Eco

1. Ah, I must've missed that line when I fixed the issue in that commit, as the one you linked is the one that builds the $templatelist variable, not the one you're reporting. Looking at my version I have one that isn't available on GitHub fixing this problem. My apologies, I will commit that now.
2. That's a known problem I was sure I had fixed. I must've renamed the folder accidentally, I'll check that out.
3. That I didn't know, I'll check the 1.6.11 source to see if they dropped that class (if so I'll see about integrating Chris' diff library).

Thanks for the translation, btw. Smile

Okay, just pushed a commit to GitHub. Redownload the zip, tell me if it fixes your problems. Smile
(2013-11-05, 08:41 AM)Seabody Wrote: [ -> ]Okay, just pushed a commit to GitHub. Redownload the zip, tell me if it fixes your problems. Smile

When trying to look at the revisions, I get the error:

Fatal error: Class 'Text_Diff_Renderer' not found in /home/...../[mybb folder]/inc/3rdparty/diff/Diff/Renderer/inline.php on line 33

I am using the latest version of mybb (1.6.11), and PHP 5.2.17

thanks for your help
Eco
Can you please attach a copy of your inline.php file here? I can't see any reference to that class in the file I'm looking at, much less on line 33.
(2013-11-06, 03:09 AM)Seabody Wrote: [ -> ]Can you please attach a copy of your inline.php file here? I can't see any reference to that class in the file I'm looking at, much less on line 33.

RIght, I manged to fix that error changing the line 493 from

$diff = new Text_Diff('auto', array(array($article['original']), array($article['content'])));
$renderer = new Text_Diff_Renderer_inline();
to

$diff = new Horde_Text_Diff('auto', array(array($article['original']), array($article['content'])));
$renderer = new Horde_Text_Diff_Renderer_Inline();

Still, some other problems:

1) When i try to edit an article, it doesnt show the formatting buttons. They are shown correctly when I create a new article.

2) After opening for edit, I get the error:

Quote:MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'O Forum Anti-NOM foi criado em setembro de 2009, bla, bla bla')' at line 1
Query:
INSERT INTO mybb_wiki_edits(aid,author,revision) VALUES('1','1,'O Forum Anti-NOM foi criado em setembro de 2009, bla, bla bla')

- Also, the button shows "edit article" when in reality it should be "Save edit", isn't it?

- I also dont know how to link article... Is there some way similar to wikipedia, that you create the link without an article and clicking on it it opens the edit page?

- Is there some easy way to define wikipedia style templates that can be used inside articles?

I have a pretty big forum, with 11,156 members, 15,951 threads and 142,009 posts, and we have a lot of content which we wish to put in a structured and easy to find way. I already tried to install mediawiki (even wrote an authentication module for registered users to access it) but the learning curve of the wiki ended up stopping people from using it. Hopefully yours will make it possible for everyone to use it.

thanks
Eco
Sorry for all the issues you're facing.

1. Fixed. Redownload from GitHub and replace Upload/wiki.php (missing exclamation mark)
2. Fixed. As above (syntax error I had missed)
3. As it is a minor issue I will not fix it immediately, but it is on my todo list. Smile
4. Do you mean a link to a wiki article? Depends on whether you're using Markdown or MyCode. Markdown's syntax is [Google](http://www.google.com) which renders Google.
5. Not at the moment. With some code modifications it should be feasible. I might include this in the next version.
Is there a way that I could not use the php at the end, for example:

http://forum.antinovaordemmundial.com/wiki

istead of

http://forum.antinovaordemmundial.com/wiki.php

(2013-11-06, 04:54 AM)Seabody Wrote: [ -> ]1. Fixed. Redownload from GitHub and replace Upload/wiki.php (missing exclamation mark)
2. Fixed. As above (syntax error I had missed)

Changed the mybb/wiki.php and still it wasnt showing the formatting buttons.

Then I tried to unisintall and install again. Then I got the error below:

Quote:Fatal error: Call to undefined method WikiInstaller::go() in /home/.../mybb/inc/plugins/wiki.php on line 57

I checked the wikiinstaller class and it actually doesn't have the go method.
Hm, double check your settings, you may have Markdown enabled.

As for the wikiinstaller class error, that was a minor code refactor gone wrong, apparently. I will be fixing this now. Smile

As for removing the .php that should be a simple htaccess edit but friendly URL support is not currently built into the wiki. It is something I want to add in a later release though.

Also just going to bump this and say that I've released version 1.0.1 on GitHub. Smile Link
I disabled markdown parser and enabled mybb parser and although I can see the formatting buttons, the source is shown, instead of the rendered:

Example:
http://forum.antinovaordemmundial.com/wi...=view&id=1

Use the MyBB Parser? Yes
Parse Smilies? No
Use Markdown Parser? No
Clickable MyCode editor Yes
Parse HTML? No

I think friendly URL support is a must, it would be great if you could implement this before we create a huge number of articles.

What about a initial page. I though in having a index page with some text and pointing to broader categories articles, to make it easy for people to find content.

Notepad could be collapseable, as it is in the way to save edit button.

And again, another error when showing the revisions :/

Fatal error: Class 'Text_Diff' not found in /home/neworder/antinovaordemmundial.com/mybb/wiki.php on line 494
Okay, fixes:

For the MyCode not parsing:
It appears that MyBB has a hidden setting, use_imgcode in the parser, which I was unaware of. To fix this, we need to turn use_imgcode on in the parser.

Find:
		$options = array(
			"allow_html"		=>	(int)$settings['wiki_parse_html'],
			"filter_badwords"	=>	1,
			"allow_mycode"		=>	$use_mycode,
			"allow_smileys"		=>	(int)$settings['wiki_parse_smileys'],
			"nl2br"				=>	1,
			"me_username"		=>	0);

Replace with:
		$options = array(
			"allow_html"		=>	(int)$settings['wiki_parse_html'],
			"filter_badwords"	=>	1,
			"allow_mycode"		=>	$use_mycode,
			"allow_smileys"		=>	(int)$settings['wiki_parse_smileys'],
			"nl2br"				=>	1,
			"me_username"		=>	0,
			"use_imgcode"		=>	$use_mycode
);

To fix the Diff Report errors:
I did some hands on testing with this. The only combination that worked per my testing was as follows:

Find:
	$diff = new Text_Diff('auto', array(array($article['original']), array($article['content'])));
	$renderer = new Text_Diff_Renderer_inline();

Replace with:
	$diff = new Horde_Text_Diff('auto', array(array($article['original']), array($article['content'])));
	$renderer = new Horde_Text_Diff_Renderer_inline();

Both of these fixes will be available in the next version of MyBB Wiki. I would push it out now but my copy has a work in progress feature which is probably slightly buggy.

I'm working on friendly URL support but it may be a while as I need to establish how MyBB does it so that I can. In particular, serving content based on the URI String (I have an idea but I need to test it).

I'm not sure about an initial page, it would depend on what you wanted to bring. Maybe (keyword MAYBE) I'll do something like ASB where you can define custom modules.

Collapsible Notepad would be a template edit or two. Smile Simple if you know Prototype or how MyBB does it.
Pages: 1 2 3 4 5 6 7 8 9