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 | 6943 visits | Activity=2.00)
Find:
By sylvie on 09/05/08 08:55 EDT

Activate the sql logs for 2.0

In admin->general, there is an option
Log SQL: only queries using more than seconds: 0.05
If you want to log all the queries, select the option
Goto
lib/setup/error_reporting.php
and replace
if ( $prefs['log_sql'] == 'y' ) $dbTiki->LogSQL();

with
if ( $prefs['log_sql'] == 'y' ) {
	$dbTiki->LogSQL();
	global $ADODB_PERF_MIN;
	$ADODB_PERF_MIN = 0;
}

After browse the table adodb_logsql
SELECT *FROM `adodb_logsql`  ORDER BY `created` DESC;


The log can be reset with
TRUNCATE TABLE `adodb_logsql`;

By sylvie on 08/28/08 09:13 EDT

Flash banners and link

Do not forget that when you want a flash banner with a link on it, you need to put the link in the flash when your export the movie
By sylvie on 08/27/08 14:12 EDT

Shadowbox for an image in a page

In 2.0, shadowbox was introduced - a nice way to display in image with shadowbox is
<
a rel="shadowbox;width=640;height=400" class="option" href="img/wiki_up/pink.jpg">See the image in a popup

By sylvie on 08/04/08 13:18 EDT

Memory limit / Display error on shared hosting

If you encounter a memory limit with tikiwiki and if your hosting allows you to have a .htaccess file
Try to add the line in your .htaccess
php_value memory_limit 32M

Some hostings let you to do that.
If you do not see the errors (even if in admin->general, your errors are turned on)
Try to add the line in .htaccess
php_flag display_errors on

Good luck
By sylvie on 08/01/08 14:07 EDT

Php Errors

On my Fedora by default, the php errors are not displayed resulting into a white page when a php error occurs even if the php log is activated (admin->geenral->php error)
Just in /etc/php.ini, change Off to On for display_errors
And reboot your server
/sbin/service httpd restart
By sylvie on 07/01/08 15:35 EDT

Redirect to a wiki page when a page is not found

Simply add in the .htaccess file in the root
something like
ErrorDocument? 404 /tiki-index.php?page=Page+not+found

By sylvie on 05/30/08 12:04 EDT

White page ... with no error

Can be a lot of reasons... Some of them

  • when it happens when you save a page or you log-in ... each time tikiwiki changes the url, it is problably because something has already being displayed in the page before the redirection is done (the header function is called). Check all the top of php files - no space before not to have anymore to be worried about the end.

  • check your errors are displayed. First check in admin->phpinfo that 'display_errors' is On . If not ask your hosting, or change your server configuration or tray to add the line in your htaccess (php_flag display_errors on)
After check you turned on the errors in admin->general

By sylvie on 05/30/08 11:44 EDT

Tracker item only visible by his user

  • Do not give tiki_p_view to this tracker
  • in the tracker configuration, check 'item creator can modify his items?'
  • have a field of type user tracker with the option 1 in the tracker

By sylvie on 05/14/08 15:40 EDT

How to redirect some pages to https

if (isset($_REQUEST['page']) && (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != 'on')) {
        if ($p == 'my_page') {
         header('location:https://'.$_REQUEST['SERVER_NAME'].str_replace('/tiki-index.php',
 '/', $_REQUEST['PHP_SELF']).str_replace('page=', '', $_REQUEST['QUERY_STRING']));
                die;
        }
}


By sylvie on 05/13/08 17:47 EDT

How not to display left and right columns for a page

  • Create a css file like this in the directory styles/
@import "mycss.css";
#leftcolumn, #rightcolumn {
display:none;
}

  • Create a category (admin->categories)
  • Assign the page to this category(admin->categories)
  • Activate the feature theme control (admin->look)
  • Associate the category to your new style

And that's it!

Prev PagePage: 2/3 Next Page
1 2 3