Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 03:20 pm 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?
 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]
 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.

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
 Quote

Status: offline

zewt

Forum User
Junior
Registered: 04/02/05
Posts: 18
Thanks for the tips. I see by that code that Gallery IS expected to be in the main_html directory of GL.

I give it a try.

Thanks again.
 Quote

Status: offline

zewt

Forum User
Junior
Registered: 04/02/05
Posts: 18
That got it.

Thanks again for the help. Very Happy
 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)
);
 Quote

Status: offline

knuff

Forum User
Full Member
Registered: 12/17/04
Posts: 340
Location:Sweden
Quote by johnc10:... change CUSTOM to lowercase custom also ...


And why would you do that ???
Vanrillaer.com - our Family Portal
 Quote

Status: offline

johnc10

Forum User
Newbie
Registered: 02/02/05
Posts: 5
Location:UK
True, it doesn't make any difference. I just looked at a previous procedure and it was in lowercase. The comma does though!
 Quote

Ken

Anonymous
cheerful
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.


Embarassed
That's what's been bustin' my chops!
Thanks!!!!
 Quote

Status: offline

terminator

Forum User
Newbie
Registered: 07/07/05
Posts: 11
artistic
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.

 Quote

Status: offline

terminator

Forum User
Newbie
Registered: 07/07/05
Posts: 11
caffeinated
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
 Quote

Status: offline

terminator

Forum User
Newbie
Registered: 07/07/05
Posts: 11
angelic
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.
 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.
 Quote

Status: offline

terminator

Forum User
Newbie
Registered: 07/07/05
Posts: 11
sounds good but I wouldn't know where to start...lol
 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.
 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
 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?
 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
 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
 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
 Quote

Page navigation

All times are EDT. The time is now 03:20 pm.

  • 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