Koozali.org: home of the SME Server

Obsolete Releases => SME 7.x Contribs => Topic started by: guest22 on May 28, 2011, 09:33:31 AM

Title: Nice URL with Wordpress
Post by: guest22 on May 28, 2011, 09:33:31 AM
Hi guys,

does anybody know how to get nice URL's with wordpress instead of the default 'domain.com/?id etc' please?

I've tried the various hints and tips and 'permalink' methods, but they all seem to fail. I'm sure it's me, but just need a little help.

TIA!

guest
 
Title: Re: Nice URL with Wordpress
Post by: mmccarn on May 28, 2011, 01:35:43 PM
Did you start with the dungog wordpress contrib, or did you install wordpress manually?
Title: Re: Nice URL with Wordpress
Post by: guest22 on May 28, 2011, 03:15:31 PM
Manually.
Title: Re: Nice URL with Wordpress
Post by: chris burnat on May 29, 2011, 07:50:40 AM
Moving to Contribs section.
Title: Re: Nice URL with Wordpress
Post by: calisun on May 31, 2011, 09:02:21 PM
By default SME has permalinks disabled, to enable them, issue the following command:

db accounts setprop ibayname FollowSymLinks enabled
db accounts setprop ibayname AllowOverride All
signal-event ibay-modify ibayname

REPLACE "IBAYNAME" with the name of your iBay

Once you issue this command, than you have to create .htaccess as instructed by wordpress.


And, just a FYI, you will not be able to upgrade to the next wordpress release 3.5 since it will require
    * PHP version 5.2.4 or greater
    * MySQL version 5.0 or greater
and this is not available in SME until v.8 is out (god knows when)
Title: Re: Nice URL with Wordpress
Post by: guest22 on June 03, 2011, 05:04:33 AM
Cheers, will give that a go and let you know.
Title: Re: Nice URL with Wordpress
Post by: guest22 on June 03, 2011, 05:32:07 AM
ps. any hint on how to make

upload_tmp_dir = /tmp

permanent in php.ini through a db command?
Title: Re: Nice URL with Wordpress
Post by: mmccarn on June 03, 2011, 01:09:24 PM
You need a custom template fragment either way.  This fragment will put upload_tmp_dir just after "upload_max_filesize..." in /etc/php.ini:
Code: [Select]
mkdir -p /etc/e-smith/templates-custom/etc/php.ini
cd /etc/e-smith/templates-custom/etc/php.ini
echo "upload_tmp_dir                         = /tmp" > 60UploadTmpDir
expand-template /etc/php.ini

You could build a custom template that looks like /etc/e-smith/templates/etc/php.ini/60FileUploads, then set a db variable with the desired value -- but if you want to do that I recommend that you start in the bug tracker with a new feature request, then upload your fragments to the bug so they're more likely to get into the core.
Title: Re: Nice URL with Wordpress
Post by: guest22 on June 03, 2011, 02:36:07 PM
Thanks, worked like a charm. Wasn't sure if it could be set through a db command for the variable was not listed under php on the wiki db configuration page.

Cheers,
guest
Title: Re: Nice URL with Wordpress
Post by: mmccarn on June 04, 2011, 01:40:54 PM
The trick described in http://wiki.contribs.org/DB_Variables_Configuration#Miscellaneous_Other_DB_Variables can be used to see if there is any template fragment that is outputting a specific configuration file option - after which it's easy to figure out if the specific option can be configured using a db variable, or whether a custom template fragment is required.

On my system, for example,
Code: [Select]
cd /etc/e-smith
fgrep -lRi upload_max_filesize templ*/*

produces the following:
Code: [Select]
templates/etc/php.ini/60FileUploads
Now it's easy for me to examine this fragment to see if there's a db variable that does what I want:
Code: [Select]
cat templates/etc/php.ini/60FileUploads
file_uploads                           = On
upload_max_filesize                    = {
    my $mf = $php{UploadMaxFilesize} || "10M";
    $OUT .= "$mf";

From this, I can tell that I can set "upload_max_filesize" with the db variable "UploadMaxFilesize".

In your case, fgrep -lRi upload_tmp_dir templ*/* returned no results at all, so there couldn't be any existing template fragment outputting a value for this setting - therefore, a new custom template fragment is required.