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 09/30/11 13:13 EDT
(35 posts | 10066 visits | Activity=2.25)
Find:
By sylvie on 09/30/11 13:13 EDT

phpmyadmin and pagination

To take away the pagination, put in config.inc.php
$cfg'MaxTableList' = 1000;
By sylvie on 09/27/11 08:14 EDT

Hide a tab in a template

Sometimes, you customize a templaet and do not need anymore the tab at the top because it is the only one.
{if ...}
{$headerlib->add_js('$("#tab1").hide();')}
{/if}

By sylvie on 09/20/11 14:16 EDT

Facebook comments in article

<div id="fb-root"></div>
<script src="http://connect.facebook.net/fr_CA/all.js#appId=1111111&xfbml=1"></script>
<fb:comments xid="{$articleId}" href="http://tikiexpert.com/{$articleId|sefurl:article}"></fb:comments>

Replace 1111111 with your Application ID
The application ID can be get at
http://www.facebook.com/developers set up a new App
See the documentation
http://forum.developers.facebook.net/viewtopic.php?pid=221601#p221601
And this is the screenshot

By sylvie on 09/19/11 09:47 EDT

How to implement smarty error exception

See commit 37404
try{
...
} catch (SmartyCompilerException $e) {
$smarty->loadPlugin('smarty_block_remarksbox');
$message = $e->getMessage();
return smarty_block_remarksbox(array(
   'type' => 'warning',
   'title' => tr('Failed to execute "%0" module', $mod_reference['name']),
   ), $message, $smarty);

By sylvie on 03/09/11 19:03 EST

Redirect domain in htaccess

If you have a bunch of domains that must be redirected to one domain
Put in your .htaccess
Rewritecond %{http_host} !
mydomain.com$ nc
rewriterule
(.*)$ http://mydomain.com/$1 R=301,L

All domains that arrive there will be redirected to THE domain
By sylvie on 09/14/10 13:57 EDT

Thumbnail in facebook share

If you want to control the thumbnail facebook share displays you have to put somthing like that in header.tpl

Do not put this line if you want facebook to scan your site and pick up the first images.
If your logo is too large, you can always use a div with display:none of a smaller logo at the top of the body to have the image included in the facebook thumbnail
By sylvie on 09/08/10 17:47 EDT

Rewrite rules again

The concept of the rewrite rules is so simple but to have them running it is sometimes painful.
Some tricks
#Redirect forever
RewriteRule ^en/index.asp http://my.site.com/Home [R=301,L]
RewriteRule ^en/?$ [R=301,L]

Seems that the http is necessary for a permanent redirect
If you want also to overwrite directories, you have to put in tiki.tpl a base href

By sylvie on 06/22/09 13:49 EDT

Terms and conditions in a tracker

You could need to show up a terms and conditiona page for a regidtration tracker.
There is 2 ways to display the terms and conditions by using a static text field with a wiki parse description
You can add in the description
[http://mysite.com/tiki-print.php?page=Terms+and+Conditions|See our terms and conditions|shadowbox;title=Terms and Conditions;]

{IFRAME(src="tiki-print.php?page=Terms+and+Conditions" width="600px" height="300px") /}

By sylvie on 05/21/09 07:10 EDT

How to know which objects have a special permission for a group

If you want to know on which wiki page or which file gallery an Anonymous has special perm
SELECT pageName FROM tiki_pages
WHERE md5( concat( 'wiki page', pageName ) ) in (select objectid from users_objectpermissions where groupName='Anonymous' and objectType='wiki page');
SELECT name, galleryId FROM tiki_file_galleries
WHERE md5( concat( 'file gallery', galleryId ) ) in (select objectid from users_objectpermissions where groupName='Anonymous' and objectType='file gallery');


By sylvie on 05/11/09 07:51 EDT

Lite css with width fixed size

Just put a margin-left and margin-right top auto and a width ok x px on the #main or #main-shadow description
Page: 1/4 Next Page Last Page
1 2 3 4