Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 05:42 am EST

Geeklog Forums

Using symbolic links when installing plugins


Status: offline

magomarcelo

Forum User
Junior
Registered: 05/21/04
Posts: 16
Location:Milano, Italy
I was wondering if it was possible to use symbolic links, insteading of copying and renaming the directories pubilc_html, admin etc within the directory structure of a plugin.

This would have the advantage not to scatter things and to allow an easier upgrade of plugins.

This works for anything excluding the CSS update, which requires the style.css to be modified. I don't know if there are alternative ways to import automatically without changing the original style.css...
--m
http://magomarcelo.blogspot.com
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by magomarcelo: I was wondering if it was possible to use symbolic links, insteading of copying and renaming the directories pubilc_html, admin etc within the directory structure of a plugin.

This should work, if your webserver supports it (it's a config option in Apache).

bye, Dirk
 Quote

Status: offline

magomarcelo

Forum User
Junior
Registered: 05/21/04
Posts: 16
Location:Milano, Italy
I was speaking too soon
I get this error when accessing pages that reference lib-common.php as relative path:
Text Formatted Code
PHP Fatal error:  main(): Failed opening required '../lib-common.php' (include_path='.:/usr/lib/php') in /usr/local/geeklog-1.3.9/forum/index.php on line 37
 

--m
http://magomarcelo.blogspot.com
 Quote

Status: offline

magomarcelo

Forum User
Junior
Registered: 05/21/04
Posts: 16
Location:Milano, Italy
I've found a solution myself, it is necessary to make a symlink also for the file lib-common.php file within the directory of the specific plugin.

Here is a working file system layout, with the possibility to switch between two different versions of the forum plugin:
Text Formatted Code

/usr/local/geeklog/plugins/forum -> forum-2.3.1/
/usr/local/geeklog/plugins/forum-2.3
/usr/local/geeklog/plugins/forum-2.3.1
/usr/local/geeklog/plugins/forum-2.3.1/lib-common.php -> ../../public_html/lib-common.php
/usr/local/geeklog/plugins/forum-2.3/lib-common.php -> ../../public_html/lib-common.php
/usr/local/geeklog/lib-common.php -> public_html/lib-common.php
/usr/local/geeklog/public_html/forum -> ../plugins/forum/public_html/
/usr/local/geeklog/public_html/admin/plugins/forum -> ../../../plugins/forum/admin/

 

--m
http://magomarcelo.blogspot.com
 Quote

All times are EST. The time is now 05:42 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content