Closed (fixed)
Project:
Node Gallery Access
Version:
6.x-2.x-dev
Component:
User interface
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
31 May 2010 at 05:58 UTC
Updated:
8 Nov 2010 at 15:40 UTC
Jump to comment: Most recent file
Comments
Comment #1
glitz commentedin 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)
Comment #2
dbeall commentedadd 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,
);
Comment #3
glitz commenteddbeall,
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
Comment #4
dbeall commentedyou 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 ======
======then add just this part here=====
Comment #5
glitz commentedgot it. thanks very much for help with this........
--Chris
Comment #6
dbeall commentedit should look like this one.. well the formatting or spacing is not correct, but the code runs fine.
Comment #7
dbeall commentedI 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
Comment #8
glitz commentedlooks 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.
Comment #9
glitz commentedi also got to figure out theming it to fit the feel of my site, but this is a great module
Comment #10
dbeall commentedi never have got into panels yet, but I think you can insert a view or a 'path'(user/1/galleries) into a pane.
Comment #11
dbeall commentedYou could do it in a block, i think..
Comment #12
glitz commentedi'll give it a shot and let u know, thanks
Comment #13
glitz commenteddbeall,
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.....
Comment #14
glitz commentedgot 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!
Comment #15
igorik commentedmaybe 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
Comment #16
justintime commentedGreat 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.