hello.

i have installed/enabled node gallery and node gallery access. i am able to create,edit and manage my own gallery.. but when going to another users profile, I am unable to view their galleries. I do not even see a tab or anywhere on their profile I can access their gallery. I went over the permissions and documentation but I am obviously missing a key point.

any help is appreciated.

I'd also like to add a view for "my galleries" to place in a panel. this view would show and link users galleries. I was able to enable the "public galleries" view, But that shows all public galleries from all users.

Thanks again,
Chris

Comments

glitz’s picture

in addition, i do not want a "public Galleries" view for all to see but Id like for all users to be able to view all other users' galleries via their main profile page. (whether that be a tab, or a panel view)

dbeall’s picture

add a 'my galleries' tab on user profile page....

node_gallery/node_gallery.module
@@line 45

/**
* Implementation of hook_menu().
*/
function node_gallery_menu() {
$items = array();

$items['user/%user/galleries'] = array(
'title' => 'My Galleries',
'page callback' => 'node_gallery_list',
'page arguments' => array(1),
'access arguments' => array(NODE_GALLERY_PERM_VIEW_GALLERY),
'file' => 'node_gallery.pages.inc',
'file path' => drupal_get_path('module', 'node_gallery'),
'type' => MENU_LOCAL_TASK,
);

glitz’s picture

StatusFileSize
new26.69 KB

dbeall,

Thanks.
i inserted that code but i am getting the following error:

Fatal error: Cannot redeclare node_gallery_menu() (previously declared in /home2/(sitename)/public_html/sites/all/modules/node_gallery/node_gallery.module:42) in /home2/(sitename)/public_html/sites/all/modules/node_gallery/node_gallery.module on line 181

I am including entire code of node_gallery.module file i am using.

I edit this file and upload as node_gallery.module file, although I am not sure if the formatting is correct, as I have no experience in programming.

thanks again for your help,
Chris

dbeall’s picture

you have the hook menu code in there 2 times...
be sure to clear cache after the change...

node_gallery/node_gallery.module
@@line 45
========= find this part ======

/**
* Implementation of hook_menu().
*/
function node_gallery_menu() {
$items = array();

======then add just this part here=====

$items['user/%user/galleries'] = array(
'title' => 'My Galleries',
'page callback' => 'node_gallery_list',
'page arguments' => array(1),
'access arguments' => array(NODE_GALLERY_PERM_VIEW_GALLERY),
'file' => 'node_gallery.pages.inc',
'file path' => drupal_get_path('module', 'node_gallery'),
'type' => MENU_LOCAL_TASK,
);
glitz’s picture

got it. thanks very much for help with this........

--Chris

dbeall’s picture

StatusFileSize
new26.45 KB

it should look like this one.. well the formatting or spacing is not correct, but the code runs fine.

dbeall’s picture

I have a sample of one site I did this, using a view for the gallery list
http://buckeyelake.org/users/admin
http://buckeyelake.org/user/1/galleries

glitz’s picture

looks awesome. thats kind of where Im trying to get with mine. i got a main profile page for each user with using views/panels and want to get a preview of that particular user's gallery in a panel.

but at least i got a link to their galleries now via a tab!
awesome work.

glitz’s picture

i also got to figure out theming it to fit the feel of my site, but this is a great module

dbeall’s picture

i never have got into panels yet, but I think you can insert a view or a 'path'(user/1/galleries) into a pane.

dbeall’s picture

You could do it in a block, i think..

glitz’s picture

i'll give it a shot and let u know, thanks

glitz’s picture

dbeall,

well, i found a views import code for allowing me to view gallery cover pages in a block ( http://drupal.org/node/544748 ) , but i am having a problem having it appear with only that specific users gallery, on their profile page.

So, basically i need a views import code to create a view (then insert into a panel) that is for "My galleries" that shows only thumbnails of the gallery covers, that when clicked on, link to the gallery page.

....still working on it but will try to find some help in views.....

glitz’s picture

got everything working except for 2 things.(and i did try to search around to see if i could find answer but i had no luck)
i need to limit the number of characters in a title of a pic. because if its too long it will run out of the shadowbox that surrounds the thumbnail. (I can attach a screenshot if needed).
Also, I got the grid view working on the images page, but i cant seem to do the same on the page that lists the galleries with covers. Id like to format that in a grid, and get rid of the bullets in front of each pic.

anyone able to help-thanks again!

igorik’s picture

maybe this code could be in own module/theme, because anytime I will be upgrading node gallery module, I lost these changes.

anyway, this code (it is some time when it was published here) doesn't work for me. It really add new tqb into user profile, but when I click on it, I will got empty page.

maybe the better solution could be add new view(or new view display into existing node gallery view) with settings: tab with path user/%1/galleries
and then this wiew can be modified. There will be not neccessary any changes directly in node gallery module code

However, in this case there can be weird that user galleries are on two paths: galleries/uid and on user/uid/galleries...

what do you think?
thanks
Igor

justintime’s picture

Status: Active » Closed (fixed)

Great idea. So good, I whipped it up in an hour :)

http://drupal.org/node/965584

Marking as closed. Please add comments to the issue above instead of this one, since this is really an NG issue anyways.