Q: Can I empty every page ?
A: Apparently yes.
Q: How do I create a new page in Tavi Wikki ?
A: Typically, a new page is created to expand on something from an existing page. The first step is to make a link to your (so far nonexistent) new page. You do this by adding a new WikiWord, which is several words with capital letters all squished together. This will be the title for your new page. After you save the page where you added the WikiWord, you will see a question mark beside that word. Click on the question mark, and that will create and let you edit the new page.
Q: How do I hide the question mark in a word like IdoNOTwantAquestionMarkATtheEND? ?
A: Put an exclamation mark (!) in front of your NonWikiWord
Q: If you look at the source of the RecentChanges page, the list of RecentChanges is produced by the following:
[[! *]]
I have looked meticulously through the Tavi code, but have not been able to find the precise point at which this bit of code is processed. So my question is: how does Tavi create the RecentChanges list? Is it pure magic? Thanks - JayS
A: See $ViewMacroEngine in [lib/defaults.php], which maps macro '!' to function view_macro_category. The function parse_macros in [parse/transforms.php] handles parsing the [[ macro-name macro-args ]] syntax, and you can find view_macro_category in [parse/macros.php].
Q: After we upgraded to MySQL 4.1, Tavi began functioning oddly. Page updates work, except that every time a page is saved, the following output is shown (example):
Error executing database query. Please contact the administrator for assistance. UPDATE pages SET time=2004-11-21 05:44:10, supercede=NULL WHERE title='Foobar' AND version=5
A: This is a bug in Tavi when using MySQL 4.1 or higher; the TIMESTAMP column format changed between 4.0 and 4.1. You can read about this change [here].
The above "SET time" SQL query value needs to be enclosed in single-quotes.
Edit lib/page.php. Starting at line 91, you will find the following PHP+SQL code statement:
$this->db->query("UPDATE $PgTbl SET time=$this->time, " .
"supercede=NULL WHERE title='$this->dbname' " .
"AND version=" . ($this->version - 1));
Change line 91 to:
$this->db->query("UPDATE $PgTbl SET time='$this->time', " .
Q: My "Document last modified" timestamp in the footer is always giving bogus dates and times. Not just a timezone issue: All the pages are showing that they were last modified on Wed, 03 Dec 2003! please see http://disco.nnected.com/wiki I'm using the latest version .25 from sourceforge. Is there something that needs to be changed in the template? I know very little about PHP but can read it somewhat. It is acting as if nothing is ever setting/updating the argument 'timestamp' when the page is saved, or if it did it it only did it once.
A: This is an issue with MySQL 4.0 + . Please see the following page for a quick solution:
http://www.moztips.com/wiki/index.pcgi?page=MySQLfourTimeIssues - JayS
Q: How do you get the document history link to work when you get this message; Warning: fopen() [function.fopen]: SAFE MODE Restriction in effect. The script whose uid is 502 is not allowed to access /tmp owned by uid 0 in /var/www/html/tavi/lib/diff.php on line 14
Warning: fopen(/tmp/wiki_3055_1.txt) [function.fopen]: failed to create stream: No such file or directory in /var/www/html/tavi/lib/diff.php on line 14
Error creating temporary file.
Please contact the administrator for assistance.
A: I just put the source of a modified diff.php on NoExecuteOnServer. This uses native php code for the diff functionality. I hope the developers make this optional in next release.
Q: Well? Have they? It doesn't look like it, because with 0.25 I get the same error message. Looks like I'll be using the code from above... --morpheus
Q: How to create a link that will pop up and open a new window?
A: It's believed that users who wants to pop up links in another windows knows their browsers shortcut to do so. It's not Tavi's responsibility to open other windows, and thus not available. It's possible to write patches to accomplish this, but they are often not crossbrowser compatible, and/or depends on javascript.
Q: Is it possible to restrict the editing/saving actions of the wiki to certain users (with a login/password) ?
A: Not really, but some people think this is a good thing!
A clumsy hack is available if you run your own apache server, and is as listed below:
AuthType Basic AuthUserFile /etc/httpd/passwd <LimitExcept GET> AuthName Tavi Require valid-user </LimitExcept>
This could be set in a .htaccess file if AllowOverride AuthConfig is set for your web space. See the [Apache Documentation]. I agree, though, that if you believe in the Wiki:WikiWay? this control should be intentionally left out. There is always a way! --AndrewJorgensen
Q: Sometimes I get messages similar to the following:
A: Check your config.php file. Are there any lines or spaces before the <?php at the top? Are there any spaces or lines after the ?> at the bottom of the file (even a seemingly harmless blank line)? If so, delete them.
A2: There is also the possibility that you have already sent some form of output to the browser. In this case simply placing the line <? ob_start(); ?> will correct this problem.
A3: I have met the same thing when I install Tavi at the first time, and it is because the <? ?> tag was not allowed in the php.ini(only <?php ?>).
A4: I came across this issue when I was making the anti-spam plugin for Tavi. What happened was that another script on my site was using the default name for PHP sessions ('PHPSESSID', I think). I used the [session_name() function] to set the session name to something unused. If you installed a plugin for Tavi that uses sessions and if some other script on your site also uses sessions, this error could occur.
A5: I found that there were around a dozen blank lines at the end of config.php after my pretty basic install. I cannot tell whether these were present in the distribution or added after my pathetic editing attempts. As mentioned above, deleting the blank lines cured the problem. Oddly, in struggling to find out what was going on I found some other errors and issues with config.php too and each time the 'errored line' changed - most confusing.
Q: What are the minimum mysql database permissions for Tavi?
A: INSERT, SELECT, UPDATE, and DELETE should be sufficient for day-to-day usage of the script. That excludes the creation of the database itself and the database tables, which is a one-time operation.
Q: My document history seems to be clean up too frequent. How to setup system so pages are kept for ever?
A: This should easily be accomplished by setting $ExpireLen=0. However due to a bug in versions previous to 0.25, this didn't happen. In fact any version of pages older than a day (except for the newest version) was deleted, when $ExpireLen=0. See TaviBugsFixed/ExpireLenBug.
Q: Does Tavi support using HTML in a page? If so, how? If not, is this planned?
A: See EnablingRawHTML.
Q: TaviFeatures says it's possible for the administrator to secure a page to prevent editing. How is this done?
A: Go to the /admin page and use the lock/unlock feature. Be sure to have the admin enabled (in config.php)
Q: How do you embed graphics other than including a link to a graphic on another Web site?
A: I sure hope someone will come up with the answer. I have noticed that most Wiki sites are free of graphics yet sometimes only a map, photo, or diagram will do. Twiki allows you to upload a graphic, which initially embeds at the foot of the page. But the link can be cut and pasted in where you want it.
A2: As of 0.22 - which I just recently installed - using the URL of the graphic syntax works for me.
A3: As of 0.25 - soon to be released - enables you to use InterWiki references to graphics.
A4: No you can't upload a graphic. You can put the graphic somewhere else and link to it as A2 says, but you can't upload an image to the wiki. I also agree this would be a very nice feature to have.
Q2: How do you add any binary file to the Wiki (e.g. a Word document, image, tarball etc)?
A: 'Tavi has no own upload function. You can only upload files by other means and link to them.
Perhaps somebody here can help me, I do not know where to ask questions about Tavi.
Q: When I edit the page and save, the page nevertheless is blank, even though the text is saved in the database. When I edit again the text is displayed in the text field.
A1: Probably your browser displays the cached version of the page. Hit the Shift+Refresh! (Ctrl+Refresh in IE.) I got the same problem. Is this a bug? I think it is. There should be a way to fix this, as for example UseMod does not have this problem.
A2: OK, I had to find a solution to this problem, and I finally came up with this hack: Change ./lib/headers.php to say:
// header("Expires: $now GMT");
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: $now GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
Q: When I click View document history I get Error creating temporary file.
A: That is a permission problem, fix it with chmod 777 /tmp.
A: Actualy the command should be chmod 1777 /tmp or chmod u=rwx,g=rwx,o=rwxt /tmp.
Q: I got the same problem under MS-Windows. Should I modify the config of Apache, or do anything else? have any suggestion?
Q: Is this the answer to question 'Strange error' a little further up the page? If so, kindly update that answer too!
Q: How come when I type "'" it looks ok from preview, and in MySQL database, but afer I saved the document it changed to "\'". Why has is there a backslash? It's not there in MySQL!
So what's wrong with my system? How can I fix it?
Q: I wanna edit the footer of my page ( in the same place of search, edit, etc ) like as this web, it have the sourceforge logo... i wanna do the same thing...
A: Take a gander at template/common.php and look down near the bottom of the file.
Q: I'm getting strange errors when using safe mode?
A: See the page TaviBugs/PhpSafeMode. This will hopefully be adressed shortly... ;)
Q: When excuting "http://mysite/tavi/index.php?action=style", My Apache server sent out "text/html" header but not "text/css" one.And then the wiki.css failed to take effects on my Tavi.How can I do?
A: I just tested this against the latest version, and it does send the "text/css"-header. Which version are you using? If not the latest, please upgrade.
Q: When cutting and pasting the InterWiki page from tavi into my own tavi I only see the first two InterWiki links listed in the db, what have I done wrong?
A:...
Q: I have been looking like crazy through the code before bothering you with this question: How can I switch off the visibility of visitors' IPs? They, (just like me) appreciate a relative privacy, and I don't want to show their IPs to the world! I feel that is an intrusion into their lives (and I have the Apache records anyway, so in case of probleme I can check & take action if necessary).
Even when they register, their nick name will show, but when you hover over that, the IP still shows up.
Thank you in advance for your help/counsel/ideas.
PS: Even better: how can I completely erase IP info from the Tavi database, or replace them with 198.137.240.92 (whitehouse.gov). Legislation in several countries frowns on keeping "private" data (even if it's dynamic IPs, and yes I know this is contrary to what I said about keeping Apache log data, go figure ;) ).
A: (by author of Q): OK, I found this quick and dirty solution. It's kludgy, but it seems to work: modify the file pagestore.php (in /lib), and replace all occurences of "author" (the field in the mySQL base which contains the IP) with "username" (which contains the handle, or empty). Sorry for the massacre of your code, but hey, it works!
A: A less invasive and more complete way (untested!) is to change the call to write() in page.php - that's where the "author" field in the database is filled in. Change it to put a constant string ("IP unavailable" or something) instead of the real IP, and it'll never even be held in your records. If you want to get fancy, you could even add a user option so individual users can decide whether to allow their IP to be logged.
Q: where are there in code to fix them ? (Tavi 0.25 version)
on preference page i got:
1. Line 166, column 6: end tag for "div" omitted, but OMITTAG NO was specified
</body>
You may have neglected to close a tag, or perhaps you meant to "self-close" a tag; that is, ending it with "/>" instead of ">".
2. Line 162, column 0: start tag was here
<div id="footer">
and how to fix ?
A:
Q: I have installed Tavi 0.25 and it works, but loading of each page takes much time. The loading proceeds twice (first result is wasted) and each one takes about 10 seconds. More accurately, the page is loaded in a moment, but it continues in loading (I don't know what), then the result is wasted and then the first phase repeats once more (and the result is fortunately keeped :-). Any idea how to fix it? Thanks.
A:...
Q: I get this error when i run index.php
Warning: main(lib/init.php): failed to open stream: No such file or directory in /home/users/dalkus/tavi/lib/main.php on line 72
Fatal error: main(): Failed opening required 'lib/init.php' (include_path='.:/usr/lib/php') in /home/users/dalkus/tavi/lib/main.php on line 72
A: ?
php_value include_path /home/user/www/oldlocation/tavi
while i don't remember why i've used this in the first place, this is actually something you can help yourself with if your include_path is doing something strange. just put that php_value in .htaccess file. --LukaPrincic
Q: When i access /admin/index.php i get this error:
Notice: Use of undefined constant TMPL_Administration - assumed 'TMPL_Administration' in /home/../tavi/template/admin.php on line 15
Notice: Use of undefined constant TMPL_Administration - assumed 'TMPL_Administration' in /home/../tavi/template/admin.php on line 16
Notice: Uninitialized string offset: 0 in /home/../tavi/parse/transforms.php on line 154
And that is all i get, except for the tavi logo. What is wrong with the admin part?
A: See if you have chosen a translation with a line like setConst('LANGUAGE_CODE', 'xx'); in config.php. Look at lang/lang_xx.php or lang/default.php to see if the translation for "Administration" is missing. If so add a line like setConst('TMPL_Administration', 'Administration'); with an appropiate translation as necessary.
Q: How I can enable signing in 'Tavi? (~~~~ in http://www.wikipedia.org)
A: Start with the patch TaviPatches/AutomaticSignature and improve it as necessary.
Q: How can I import text into a 'Tavi page?
A: What do you mean with "import"? Copy and paste?
Q: What is the purpose of the two boxes at the top of a new 'Tavi page?
A: What boxes?
Q: I had to re-install and now pages won't save when edited, only preview...