Welcome to Geeklog, Anonymous Sunday, September 01 2024 @ 12:41 am EDT
Geeklog Forums
Is Gallery supposed to be installed in the PLUGIN dir?
Page navigation
Status: offline
zewt
Forum User
Junior
Registered: 04/02/05
Posts: 18
I must be missing a step somewhere, with getting Gallery integrated with my GL install.
I have both GL and Gallery installed and working fine. And when I make the config change for an embedded gallery and add the full path to my GL install it seems to work fine.
But when I visit my GL URL (localhost/geeklog/main). I see nothing about gallery anywhere.
When I visit my Gallery URL (localhost/gallery), I now see GL with Gallery in it.
What am I missing? Do I need to add Gallery as a static page or Block?
I have both GL and Gallery installed and working fine. And when I make the config change for an embedded gallery and add the full path to my GL install it seems to work fine.
But when I visit my GL URL (localhost/geeklog/main). I see nothing about gallery anywhere.
When I visit my Gallery URL (localhost/gallery), I now see GL with Gallery in it.
What am I missing? Do I need to add Gallery as a static page or Block?
24
20
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Gallery is not a plugin, i.e. it doesn't use Geeklog's plugin API and therefore won't show up in the list of installed plugins.
bye, Dirk
[edit: bah, didn't read the post properly - listen to what knuff said and ignore me]
bye, Dirk
[edit: bah, didn't read the post properly - listen to what knuff said and ignore me]
21
22
Quote
Status: offline
knuff
Forum User
Full Member
Registered: 12/17/04
Posts: 340
Location:Sweden
You have to activate the link in lib-custom.php.
Look for this code and uncomment it.
* This is an example of a function that returns menu entries to be used for
* the 'custom' entry in $_CONF['menu_elements'] (see config.php).
*
*/
/*
function CUSTOM_menuEntries ()
{
global $_CONF, $_USER;
$myentries = array ();
// Sample link #1: Link to Gallery
$myentries[] = array ('url' => $_CONF['site_url'] . '/gallery/',
'label' => 'Gallery');
// Sample link #2: Link to the Personal Calendar - only visible for
// logged-in users
if (!empty ($_USER['uid']) && ($_USER['uid'] > 1)) {
$myentries[] = array ('url' => $_CONF['site_url']
. '/calendar.php?mode=personal',
'label' => 'My Calendar');
}
return $myentries;
}
*/
Once you did that and adapted config.php you will see the gallery link in your menu.
Additionally you can add some blocks, like the random picture block.
Have a look at Squatty for available plugins / blocks
Greetz,
Boris
Vanrillaer.com - our Family Portal
Look for this code and uncomment it.
Text Formatted Code
/*** This is an example of a function that returns menu entries to be used for
* the 'custom' entry in $_CONF['menu_elements'] (see config.php).
*
*/
/*
function CUSTOM_menuEntries ()
{
global $_CONF, $_USER;
$myentries = array ();
// Sample link #1: Link to Gallery
$myentries[] = array ('url' => $_CONF['site_url'] . '/gallery/',
'label' => 'Gallery');
// Sample link #2: Link to the Personal Calendar - only visible for
// logged-in users
if (!empty ($_USER['uid']) && ($_USER['uid'] > 1)) {
$myentries[] = array ('url' => $_CONF['site_url']
. '/calendar.php?mode=personal',
'label' => 'My Calendar');
}
return $myentries;
}
*/
Once you did that and adapted config.php you will see the gallery link in your menu.
Additionally you can add some blocks, like the random picture block.
Have a look at Squatty for available plugins / blocks
Greetz,
Boris
Vanrillaer.com - our Family Portal
19
22
Quote
Status: offline
johnc10
Forum User
Newbie
Registered: 02/02/05
Posts: 5
Location:UK
After uncommenting the custom_menuEntries procedure at the end of geeklog/system/lib-custom.php , then edit geeklog/config.php and uncomment 'custom' (remove //).
If you have uncommented all the previous menu elements, remember to add a comma after the 'plugins' immediately above 'custom' else you will be going around in circles trying to find why it WONT WORK AAAAAHHH. It now works, bliss.
$_CONF['menu_elements'] = array
(
'home', // link to homepage
'contribute', // contribute / "submit a story" link
'links', // link to the links section (aka web resources)
'polls', // link to past polls
'calendar', // link to the site calendar
'search', // link to advanced search
'stats', // link to site stats
'prefs', // link to user's preferences
'plugins', // links added by plugins, like {plg_menu_elements}
'custom' // for custom links (see lib-custom.php)
);
If you have uncommented all the previous menu elements, remember to add a comma after the 'plugins' immediately above 'custom' else you will be going around in circles trying to find why it WONT WORK AAAAAHHH. It now works, bliss.
$_CONF['menu_elements'] = array
(
'home', // link to homepage
'contribute', // contribute / "submit a story" link
'links', // link to the links section (aka web resources)
'polls', // link to past polls
'calendar', // link to the site calendar
'search', // link to advanced search
'stats', // link to site stats
'prefs', // link to user's preferences
'plugins', // links added by plugins, like {plg_menu_elements}
'custom' // for custom links (see lib-custom.php)
);
21
20
Quote
Ken
Anonymous
![cheerful cheerful](https://www.geeklog.net/forum/image_set/moods/cheerful.gif)
Quote by johnc10:
If you have uncommented all the previous menu elements, remember to add a comma after the 'plugins' immediately above 'custom' else you will be going around in circles trying to find why it WONT WORK AAAAAHHH. It now works, bliss.
If you have uncommented all the previous menu elements, remember to add a comma after the 'plugins' immediately above 'custom' else you will be going around in circles trying to find why it WONT WORK AAAAAHHH. It now works, bliss.
![Embarassed Embarassed](http://www.geeklog.net/images/smiles/icon_redface.gif)
That's what's been bustin' my chops!
Thanks!!!!
20
24
Quote
Hi all I realise this is an old issue, but for those of us new to geeklog it still is pertinent. I have tried the solutions described above to display the link to gallery to no avail. However, after studying the config.php and lib-common.php files I was able to come up with a solution that does work for me. Yes, I know that it is recommended that customizations be done in lib-custom.php...be that as it may for others who encounter this same issue rather than getting frustrated like I did at one point and was thinking of seeking another simpler package. I will post what I did. Maybe it may help someone else.
There are three changes necessary to display the gallery link on the top of the page. One to config.php and two to lib-common.php.
Below is the change to config.php
Add gallery to the menu elements as below;
$_CONF['menu_elements'] = array
(
'home', // link to homepage
'contribute', // contribute / "submit a story" link
'links', // link to the links section (aka web resources)
'polls', // link to past polls
'calendar', // link to the site calendar
'search', // link to advanced search
//'stats', // link to site stats
'prefs', // link to user's preferences
'plugins', // links added by plugins, like {plg_menu_elements}
'gallery', //link to gallery
'custom' // for custom links (see lib-custom.php)
Now for Lib-common.php
1st add gallery to the menu elements sub-menu of "COM_renderMenu"
as seen below;
function COM_renderMenu( &$header, $plugin_menu )
{
global $_CONF, $_USER, $LANG01, $topic;
if( empty( $_CONF['menu_elements'] ))
{
$_CONF['menu_elements'] = array( // default set of links
'contribute', 'links', 'polls', 'calendar', 'search', 'gallery', 'stats',
'plugins');
}
2nd change:
Add the following code under: "foreach( $_CONF['menu_elements'] as $item )
case 'gallery':
$url = $_CONF['site_url'] . '/gallery/index.php';
$label = gallery;
if( $anon &&
( $_CONF['loginrequired'] || $_CONF['statsloginrequired'] ))
{
$allowed = false;
}
break;
I hope you find this helpful.
There are three changes necessary to display the gallery link on the top of the page. One to config.php and two to lib-common.php.
Below is the change to config.php
Add gallery to the menu elements as below;
$_CONF['menu_elements'] = array
(
'home', // link to homepage
'contribute', // contribute / "submit a story" link
'links', // link to the links section (aka web resources)
'polls', // link to past polls
'calendar', // link to the site calendar
'search', // link to advanced search
//'stats', // link to site stats
'prefs', // link to user's preferences
'plugins', // links added by plugins, like {plg_menu_elements}
'gallery', //link to gallery
'custom' // for custom links (see lib-custom.php)
Now for Lib-common.php
1st add gallery to the menu elements sub-menu of "COM_renderMenu"
as seen below;
function COM_renderMenu( &$header, $plugin_menu )
{
global $_CONF, $_USER, $LANG01, $topic;
if( empty( $_CONF['menu_elements'] ))
{
$_CONF['menu_elements'] = array( // default set of links
'contribute', 'links', 'polls', 'calendar', 'search', 'gallery', 'stats',
'plugins');
}
2nd change:
Add the following code under: "foreach( $_CONF['menu_elements'] as $item )
case 'gallery':
$url = $_CONF['site_url'] . '/gallery/index.php';
$label = gallery;
if( $anon &&
( $_CONF['loginrequired'] || $_CONF['statsloginrequired'] ))
{
$allowed = false;
}
break;
I hope you find this helpful.
14
22
Quote
Ahh...I am retracting the above...It does solve one problem but produces undesired results in the admin page....so I will investigate a solution. Back to the drawing board...lol
24
18
Quote
Ok, the changes are cleared for implementation. I isolated the error I was getting and it was unrelated to the changes above. Infact it was an issue with the hosting service. So happy trails.
24
16
Quote
Status: offline
drshakagee
Forum User
Full Member
Registered: 10/01/03
Posts: 231
Instead of hacking lib_common.php why don't you just hard code a link in your header.thtml file?
Yes I am mental.
Yes I am mental.
21
21
Quote
Status: offline
terminator
Forum User
Newbie
Registered: 07/07/05
Posts: 11
sounds good but I wouldn't know where to start...lol
21
24
Quote
Status: offline
drshakagee
Forum User
Full Member
Registered: 10/01/03
Posts: 231
Just open the header.thtml (public_html/layout/yourtheme/) file and look for {menu_elements} and add your link right after it.
Yes I am mental.
Yes I am mental.
20
18
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
If I may interrupt here: The "custom" menu entry in config.php and lib-custom.php was made exactly for this purpose (that's why it even includes an example that links to Gallery ...).
So what exactly is your problem with this?
bye, Dirk
So what exactly is your problem with this?
bye, Dirk
16
22
Quote
Status: offline
terminator
Forum User
Newbie
Registered: 07/07/05
Posts: 11
Well, now. I never said I had a problem, other than that as per the recommended solutions made earlier in this post don't seem to work for me. Of course I could be missing something or doing something wrong. However, I did exactly as instructed, but fail to produce the desired result. Hence the reason I took the measures I did. Now, do you have a problem with that?
20
14
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by terminator: Now, do you have a problem with that?
Nope. I'm just irritated when someone takes the complicated route when we provide a much easier (and cleaner, IMO) solution.
Btw, did you remove the comment markers around CUSTOM_menuEntries?
bye, Dirk
18
16
Quote
Status: offline
terminator
Forum User
Newbie
Registered: 07/07/05
Posts: 11
Dirk, I prefer the easy way too, but I if it doesn't work I am not one to just give up...lol. Yeah I did uncomment that entry....Who knows maybe there are gremlins in there...lol
21
20
Quote
Status: offline
Dirk
Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by terminator: Yeah I did uncomment that entry....
I wasn't talking about the "comment" entry in config.php, but about the entire CUSTOM_menuEntries function in lib-custom.php. It is commented out by default.
bye, Dirk
20
18
Quote
Page navigation
All times are EDT. The time is now 12:41 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