Every user his own gallery
Is there no way to let user create his own gallery. Just his pictures on his profile. No separated categories (would be nice but not necessary). I tried gallery2, in there every user creates his category by registration. Fine! But if u go on gallery u have a list of all categories of all users. I just would like to have that u can see the picture from a user by clicking in his profile on gallery. Or similar. Image Modul looks nice, but this is not for having separated galleries. Everyone can load pictures everywhere.
I just would like that every user has his picture collection. If he loads a picture up, he don't care where it will be, because it is in his gallery. Where he can also remove it. I don't find anything like that, or maybe i blind, stupid or what ever.
Has someone a idea for me? I don't know anymore where to look. I toughed with gallery2 would be this possible.
Don't bother with my English, my German is even worser ;-)
For your help, thanks :-))

I am sure that his could be
I am sure that his could be done with views (www.drupal.org/project/views). You would create a view that accepted an argument - the uid. Then filter the view based upon uid, node type = image, and published status = 1.
The final piece of the puzzle is to create the link to the page - this would be easily done by modifying the theme layer for the user profile page. This way each user would have a link to their gallery on their profile page.
hth
Thats imazing
I don't know that it works like that. I have to get away from joomla. They way of how things are done in drupal is totally different and in this way so easy. I just have to change thinking.
GollyG thank you.
I made it quick and it works. Not so like i want it to have but almost. I just had (i guess this were also a problem before) made a view like it was explained with this drupal school about CCK, image_cache and thick box and so on. But after i use the Image Module to and they were laying on each other because of the same field name. After i renamed those and used your way i have something like i wanted. Tomorrow more. ;-) We have almost midnight in Germany and i have to get some sleep.
But again thanks a lot
Just one more thing
This with the link i dont get. I used in the view as URL user_galerie/$arg/related. It opens me if i use this path in my browser a page with all gallery's. The right path would be for ex. user_galerie/6/6 how do i get this as a link in the profile? Or how do i select this in the view? Is there still the problem?
Following things i set up:
URL:
user_galerie/$arg/related
Fields:
Node:Titel & Image (field_image)
Arguments:
User: UID Authored or Commented ASC Sort. & Benutzer: UID ist der Autor (User: UID is the Author)
Filter:
Node: Typ - selected "user_image"
Is that right?
Just one more thing
This with the link i dont get. I used in the view as URL user_galerie/$arg/related. It opens me if i use this path in my browser a page with all gallery's. The right path would be for ex. user_galerie/6/6 how do i get this as a link in the profile? Or how do i select this in the view? Is there still the problem?
Following things i set up:
URL:
user_galerie/$arg/related
Fields:
Node:Titel & Image (field_image)
Arguments:
User: UID Authored or Commented ASC Sort. & Benutzer: UID ist der Autor (User: UID is the Author)
Filter:
Node: Typ - selected "user_image"
Is that right?
--------------------------------------------------------------
Double Posting ;-) Forum has some disease ;-)
((((( Its nice to see that also the Profis has some problems ))))) Thanks ;-)
A couple of ways you could
A couple of ways you could get the link into the profile page:
theme the profile page using a tpl.php file, and add the link here
create a custom module and use hook_user - use a switch statement for the view case, and then return an array with the link in it (check the docs api.drupal.org) for the format of the array, as i think it is nested). This will be added to the profile page
Could you please write it more with more details. Step by step?
Hi
Could you please write it more with more details. Step by step?
p.s. I'm new with drupal and sorry for my english
If you just want a listing
If you just want a listing of all the pictures a user has uploaded, use Views and the Gallery viewtype that's in the latest version of the image module (2.x-dev), and add the user ID as an argument.
To embed it into profiles, use theming.
I got it so far
After playing around i found how does it works. My mistake is that i missunderstud this variable $arg. Second thing is that my Arguments in the view were mixed up i use now just User: Where User is Author, i translated it from my German version, hope its correct. Now also the URL with $arg i changed to user_gallery/$arg and if i use user_gallery/USERNAME i am in his gallery. Fine so far.
But what i don't get how can have the Profile a site if there is nor template? I just use the original like here also. This will be the last i would change. But for the Link in the Profile i wanted to change it. There is no. Is there a way to get this link on the Top of the Profile in this tabs?
It's not very well
It's not very well organized, but start here for details on theming profile pages: http://drupal.org/node/35728
I made some changes again
I made some changes again and so far so good. With this changes in a extra template i know, but what i am trying to do is: To insert automatically a tab on the top from the profile like "profil_tabs" and so on with my new view.
For that i make changes in my view for showing up in profiles. It's done, it shows up. But the path (url) i made in my view doesn't work. For better understanding i will post what i have done till now.
$view = new stdClass();$view->name = 'own_gallery';
$view->description = '';
$view->access = array (
0 => '2',
);
$view->view_args_php = '';
$view->page = TRUE;
$view->page_title = 'Eigene Galerie';
$view->page_header = '';
$view->page_header_format = '1';
$view->page_footer = '';
$view->page_footer_format = '1';
$view->page_empty = '';
$view->page_empty_format = '1';
$view->page_type = 'bonus_grid';
$view->url = 'user/$arg/galerie';
$view->use_pager = TRUE;
$view->nodes_per_page = '10';
$view->menu = TRUE;
$view->menu_title = 'Eigene Galerie';
$view->menu_tab = TRUE;
$view->menu_tab_weight = '0';
$view->menu_tab_default = TRUE;
$view->menu_tab_default_parent = NULL;
$view->menu_tab_default_parent_type = 'existing';
$view->menu_parent_tab_weight = '0';
$view->menu_parent_title = '';
$view->sort = array (
);
$view->argument = array (
array (
'type' => 'uid',
'argdefault' => '3',
'title' => '',
'options' => '',
'wildcard' => '',
'wildcard_substitution' => '',
),
);
$view->field = array (
array (
'tablename' => 'node',
'field' => 'title',
'label' => '',
'handler' => 'views_handler_field_nodelink',
'options' => 'nolink',
),
array (
'tablename' => 'node_data_field_image',
'field' => 'field_image_fid',
'label' => '',
'handler' => 'content_views_field_handler_group',
'options' => 'thickbox][thumbnails',
),
array (
'tablename' => 'comments',
'field' => 'add',
'label' => '',
'options' => 'Kommentar',
),
array (
'tablename' => 'node',
'field' => 'delete',
'label' => '',
'handler' => 'views_handler_node_delete_destination',
'options' => 'Löschen',
),
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'type',
'operator' => 'OR',
'options' => '',
'value' => array (
0 => 'user_galerie',
),
),
);
$view->exposed_filter = array (
);
$view->requires = array(node, node_data_field_image, comments);
$views[$view->name] = $view;
First of all the new tab is alltime marked as active and the second thing is that it forward all the time to profil of a user.
It shold link to /user/6/galerie but is linked to /user/6/ what i have done wrong?
I'm not sure if Views can
I'm not sure if Views can handle an argument being in the middle of the URL.
But than how should i handle
But than how should i handle this? Any Idea?
I just would like to have a tab in userprofile with his own pictures. How should i handle this else?
Not easily. The simplest
Not easily.
The simplest thing would be to add a link to the view with hook_user().
To be honest, the image module should be doing this anyway, the same way blog and audio modules have a 'recent stuff' link in user profiles. (I've just submitted a patch for this.)
If you're absolutely set on it being another tab, investigate http://drupal.org/project/profiletabs.
You could use hook_user() to embed the view in the profile, and then profiletabs takes care of making the tab.
hook_user() ??
Sorry that i ask, but i dont know what hook_user() is. I found something about this hook_user(), but i am not sure if i understand what it means. What it does and where should i use this. A link with hook_user()? In menu or in tpl files?
Could you tell me a bit over this order hook_user()? So that i understand it. Or a link that i can read about it. I am new by drupal and dont want just do somethings, i would like to understand what i am doing. Thanks
If you're new to Drupal,
If you're new to Drupal, then it might be a bit too technical for you :)
hook_user() means you need to create a module in which you define a function mymodulename_user(). This function can then add things to the user profile.
The blog module is a good example -- or the patch I've submitted here: http://drupal.org/node/5963
Do i get this right?
With just this image module and drupal, plus your patch is it possible to give user his own gallery? And to add a Gallery Tab into his profile on the top?
About this patch u submitted. This is for the image module, right? How can i patch that module?
> With just this image
> With just this image module and drupal, plus your patch is it possible to give user his own gallery?
Yes, but it's on a separate page, linked from the profile.
See http://drupal.org/patch for help on patching.
> And to add a Gallery Tab into his profile on the top?
That involves quite a bit more work.
Why?
The gallery as a extra site? A extra site is it all the time, or not? Just to open the site i would like to have beside the other profile tabs one tab one more for this extra site of useres own gallery. And on the gallery the tabs for the diffrent profile information (if i make something like that). Like the Tracker and so on.
This patching is only via shell access working?
Yes, you could do is the way
Yes, you could do is the way tracker does it. You'd need to create a module and copy the hook_menu code from tracker, and use an embedded view (the handbook explains how to embed views).
Patching -- yes, with the shell.