Blog: Tikiwiki architecture
Description: General comments about Tikiwiki: How to do it! How the code can be improved!
Created by sylvie on 02/08/08 13:05 EST
Last modified 06/22/09 13:49 EDT
(28 posts | 6942 visits | Activity=2.00)
Find:
By sylvie on 05/08/08 13:37 EDT

Backup your file galleries

echo "-------------------------------------------" >> /var/log/filebackup.log
date >> /var/log/filebackup.log
rsync -avzpog /var/www/localhost/htdocs/tiki/filegallery/ /var/www/localhost/filegallery.bak/ >> /var/log/filebackup.log
echo "Files in gallery: " >> /var/log/filebackup.log
ls -l /var/www/localhost/htdocs/tiki/filegallery | grep "" -c >> /var/log/filebackup.log

By sylvie on 05/02/08 05:56 EDT

Svn update error: Checksum mismatch for '.../.svn/text-base/...svn-base'

During a svn update, I got acouple of file with
Checksum mismatch for 'yyy/.svn/text-base/xxx.svn-base'; recorded: 'b1ffb7d76ba5c1d5603128fe23349bac', actual: '392503b51cfbe05e7b46f570743374c5'

A solution:
  • copy the yyy/xxx file
  • in yyy/.svn/entriee, delete the bloc between ^L where xxx name is found
  • svn update
  • check your copy with the file

By sylvie on 04/07/08 06:23 EDT

Site open only to Registered

A good wait to block access for Anonymous and to redirect them to the login page is to add in error.tpl
{if ($errortype eq "402") or (!$user and stristr($msg, 'permission'))}

By sylvie on 03/17/08 09:29 EDT

Popups / relative position div

Tikiwiki uses the librairy overlib to create popups.
I discovered a pretty bad situation when you use div with relative position in your layout with a popup inside this div. It does not work. The popup does not appear at the right place.
Why: because the browser interprets the relative position div first and because tikiwiki creates the div overDiv that is the popup at the first call of the popup_init. So in this case, the popup in the relative div. So the popup has the same relative offset. Whatever you call the popup_init in the main div....

Solution: do not use relative div... or patch the code - patch available on demand
By sylvie on 03/13/08 09:52 EDT

Permissions for the stagging feature

I had a site where
  • Anonymous see nothing
  • Registereds see the approved pages and not the stagging pages
  • Authors see the staging+approved pages. They can edit staging pages. They see all the pages: They can categorized with other categories the pages.
  • Approvers see the staging+approved pages. They can approve pages.
The groups are included in each other
Anonymous < Registered < Authors < Approvers

Group perms
  • Registered
    • tiki_p_view
    • tiki_p_view_categories
    • tiki_p_view_categorized
  • Authors
    • tiki_p_edit
    • tiki_p_edit_categorized
    • tiki_p_wiki_view_history
  • Approvers
    • tiki_p_remove
    • tiki_p_rename
    • tiki_p_rollback

2 categories
  • Staging
  • Approved

Categories perms
  • Staging
    • Authors: tiki_p_view_categories
    • Authors: tiki_p_view_categorized
    • Authors: tiki_p_edit_categorized
  • Approved
    • Registered: tiki_p_view_categorized
    • Authors: tiki_p_view_categories
    • Approvers : tiki_p_edit_categorized

Wiki staging setting:
  • If not in the group, edit is always redirected to the staging page edit: Approvers
  • Delete staging pages at approval: yes
  • Categorize approved pages with categories of staging copy on approval: yes
  • Force bounce of editing of approved pages to staging: yes
  • Category for staging pages: Staging
  • Category for approved pages: Approved
  • Category for pages out of sync: none
  • Unique page name prefix to indicate staging copy: *

What happens during the staging process with this configuration?
  • For example a page named mypage. During the staging, 2 pages will be able to coexist, mypage = approved version, *mypage = stagging version
  • An author clicks edit on mypage, the edit page pannel opens the stagging page *mypage. When he saves *mypage, tikiwiki assigns *mypage to the stagging category. If an author clicks edit on *mypage, the edit page opens on *mypage
  • An approver approves *mypage. tikiwiki copies all the history of *mypage changes on top of mypage history and assigns the category approved to mypage. tikiwiki deletes *mypage


By sylvie on 03/12/08 13:40 EDT

I have the plugin, but I want to put it in a smarty template

I want to use this plugin in a template
Here is a quick hack
You want to use the plugin submit in a templates
Create a file lib/smarty_tiki/block.wikipluginsubmit.php with the above php code
function smarty_block_wikipluginsubmit($params, $content, &$smarty){
include_once('lib/wiki-plugins/wikiplugin_submit.php');
return wikiplugin_submit($content, $params);
}

and insert in the template such a code
{wikipluginsubmit text=y}{/wikipluginsubmit}

By sylvie on 03/10/08 08:18 EDT

Use paypal in a tracker for a job offer

Use a tracker with a status pending at the creation. Only admin can see the pending and close items.
{TRACKER(trackerId=1, fields=>1:2:3, action=>Buy, showtitle=>n, showdesc=>n, embedded=>n)}
__Your demand has been received, Please pay now__
Place the paypal code here
{TRACKER}

Find the paypal code here
When you receive the payment, change the status of the item to open
By sylvie on 02/15/08 12:29 EST

Wiki Images in MultiTiki

Wiki image and multiwiki are not working properly!

When you are in a multitiki, the images are stored in img/wiki_up/tikidomain and the wiki source is img/wiki_up/

If you want to use such an image in another site you will use
mydomain.om/img/wiki_up/image.gif
or
mydomain.om/img/wiki_up/tikidomain/image.gif

The first case is better - but need to have plan a rewrite rule for that
First Page Prev PagePage: 3/3
1 2 3