Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: show user galleries on front page  (Read 8632 times)

0 Members and 1 Guest are viewing this topic.

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
show user galleries on front page
« on: January 24, 2015, 06:46:30 pm »

Hi Friends,
I searched first, and found a few topics asking about this, but they are all for older versions.  And I don't understand enough about the program to know if those answers would apply to my version (1.5.34).  So I ask -- Is there any way to show the user galleries on the front page, just like other categories?  If so, how?

Attached is a screenshot, just for clarity.  I want to know if it's possible to show the user galleries in the same way as, for example, the Contest category or Tutorials category.  It's the part of those categories that I put a red rectangle around, that I want for the User Gallery category.  If that's possible, how to do it?

Thank you very much   :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: show user galleries on front page
« Reply #1 on: January 24, 2015, 10:10:26 pm »

Please post links to the old mods, so we can use them as base for a cpg1.5.x compatible mod, if needed.
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: show user galleries on front page
« Reply #2 on: January 25, 2015, 05:12:46 am »

Mods?  Is "mods" the same thing as "plugins"?  Do you mean if the older topics i found (for older versions) might have used?  I didn't read them closely, but I'll re-search and research   ;D

I'll read the older topics more closely, and post what I can find.
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: show user galleries on front page
« Reply #3 on: January 25, 2015, 04:55:52 pm »

Yes, old threads that include the type of modification you want. It saves us spending ages searching for one only to find it is not the one you wanted.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: show user galleries on front page
« Reply #4 on: January 26, 2015, 02:29:28 am »

Ok, well the 2 most recent of the old topics never were answered.

This one (1.4): http://forum.coppermine-gallery.net/index.php/topic,32752.msg152332.html#msg152332
uses anycontent.  But they just have a few specific members whose galleries they want on the front page.  I want them all to be shown.

This one (1.4):  http://forum.coppermine-gallery.net/index.php/topic,48137.msg230224.html#msg230224
says it can't be done.

This one (1.2):  http://forum.coppermine-gallery.net/index.php/topic,3113.msg13655.html#msg13655
says to create a category for each user.  I wouldn't consider this a reasonable solution, because then each member has 2 galleries.  And plus, they would not be able to add their own albums, or manage their gallery (in a public category).

This one (1.4):  http://forum.coppermine-gallery.net/index.php/topic,38911.0.html
appears to be some kind of mod.  But I don't have the technical expertise to understand exactly what it does, or whether it even works, at all.

This one (1.4):  http://forum.coppermine-gallery.net/index.php/topic,31041.msg143639.html#msg143639
says it's not possible without a lot of hacking.

This one (1.3):  http://forum.coppermine-gallery.net/index.php/topic,8101.msg35789.html#msg35789
references a mod called cpg1.2_mod_private-album-thumb.zip for 1.2, but I'm not clear if it's what I want.  It also says there was another mod and to search the mod board, but it doesn't say what it's called (so how do you search for something if you don't know the name?)

This one (1.4):  http://forum.coppermine-gallery.net/index.php/topic,30619.msg141719.html#msg141719
implies it can be done with a hack, but doesn't say anything more than that.

This one (1.2):  http://forum.coppermine-gallery.net/index.php/topic,8682.msg38941.html#msg38941
references 2 other topics -- 1 is a dead link (http://forum.coppermine-gallery.net/index.php/topic,5894.0.html) and the other appears to be a mod -- http://forum.coppermine-gallery.net/index.php/topic,5900.0.html  It sounds like it's what I want, but I don't understand a lot of the thread.  Plus, it's in Outdated Mods board.

Despite the fact this appears to be a much requested feature, searching the Mod board does not produce any results (searching "user galleries front page").  Maybe there would be better, more technical search terms, but I don't know what they are.

Ok, I hope this helps   :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: show user galleries on front page
« Reply #5 on: January 26, 2015, 07:35:42 pm »

This one (1.4):  http://forum.coppermine-gallery.net/index.php/topic,38911.0.html
appears to be some kind of mod.  But I don't have the technical expertise to understand exactly what it does, or whether it even works, at all.

Just tested, works also with cpg1.5.x. It replaces the category "User galleries", with the actual personal galleries of your users. I tested with an account "admin" and "test" and each created several albums and uploaded files to them. I got 2 new categories ("admin" and "test") including the counters how much albums and files reside in each new category. The plugin currently doesn't support the config option Show first level album thumbnails in categories. If this is required for your gallery, I'll try to add that feature as soon as possible. Please install that plugin and test if it's what you're looking for in general or if it should look somehow different.
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: show user galleries on front page
« Reply #6 on: January 27, 2015, 04:51:10 pm »

Yes, I do have that option enabled.  So I guess I should disable it, while I test?

I'm not sure if I absolutely have to use it.  I'll figure that out after I disable it, and let you know.

So you say it's a plugin, which means I should be able to install it, without extra help (I would definitely need help with a mod or hack).

Ok, I'll get busy on that, and let you know how it works   :)

Thank you very much!
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: show user galleries on front page
« Reply #7 on: January 27, 2015, 05:11:56 pm »

I do have that option enabled.  So I guess I should disable it, while I test?

You don't need to disable it, but of course you can, if you like. I just tried to tell you, that the plugin currently doesn't support that option, which means, it won't display first level albums for the user categories, regardless what you've set in the config. If it's fine for you that it doesn't do that or if you disable that option in the general config, I won't waste time to add that feature to the plugin if you don't need it. That's all.
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: show user galleries on front page
« Reply #8 on: January 27, 2015, 05:45:18 pm »

Ok, thanks Andre.  I'll let you know if I need it.

But first, I'm having a couple of problems.  First, it won't upload using the Plugin Manager.  But before I upload using my SSH, the 2nd problem is that I'm not sure that's the right file.  Following the Download link given in this topic: http://forum.coppermine-gallery.net/index.php/topic,38911.0.html takes me to a file on Sourceforge called CPGPicDownload-1.1.  Is that the right file?  That file name doesn't seem quite right, for what I want.  Is that the same one you tested?

Thanks   :)
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: show user galleries on front page
« Reply #9 on: January 27, 2015, 06:15:55 pm »

I found the right file.  Testing....
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: show user galleries on front page
« Reply #10 on: January 27, 2015, 06:59:43 pm »

Got it installed!

Attached is a screenshot (cpg2.png), or you're welcome to visit http://inkscapecommunity.com/ic_gallery/index.php (although I'm in proeess of trying different things, and might not look like the screenshot, when you happen to visit).

So if you have a whole lot of members, this will make for a very long page!  Would there be a way to make columns?  So let's say after there are 8 or 10 member galleries, start a 2nd column?  And after 16 or 20, start a 3rd column?

I'm not sure how this would change, if you made it to support "first level album thumbnails in categories".  Would it show each member's albums, with thumbnail?

Here, I made a mockup, showing what I was looking for (cpg3.png) -- so the User Galleries category would look just like all the other categories.  This plugin provides at least a link to each member's gallery.  It's not exactly the same....but it's essentially what I was looking for.  It does'n't look the same, but functions basically ok.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: show user galleries on front page
« Reply #11 on: January 27, 2015, 07:38:35 pm »

I'm not sure how this would change, if you made it to support "first level album thumbnails in categories".  Would it show each member's albums, with thumbnail?

Yes, so the list will get even longer, as additional information is displayed.


Here, I made a mockup, showing what I was looking for (cpg3.png) -- so the User Galleries category would look just like all the other categories.

Your mockup has one mistake: it immediately displays albums (at least you added the typical album buttons information next to the thumbnail images). Please compare with the user galleries category (http://inkscapecommunity.com/ic_gallery/index.php?cat=1). There's an additional level of categories, one category for each user.


Let's try a different solution. I used Paver's anycontent.php code and adjusted it to display all user galleries. Copy the following code to your anycontent.php file and have a look at the result:
Code: [Select]
<?php

if (!defined('IN_COPPERMINE')) {
    die(
'Not in Coppermine...');
}

starttable("100%"'User galleries');
echo 
'<tr><td class="tableb">';
list_users();
echo 
'</td></tr>';
endtable();

?>

(please don't forget to add "anycontent" to the content of the main page).
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: show user galleries on front page
« Reply #12 on: January 27, 2015, 08:55:56 pm »

Ok, I've uninstalled that plugin, so I can test this code.  Or did you mean to use your code with the plugin?

I already am using anycontent, but I'm not sure where to insert your code.  I want it to go just under my Featured Image section, and before the Tutorials category.  I'm guessing it should go after endtable(); and before ?> but that's a guess.

Here's my anycontent code, so you can tell me where:

Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2013 Coppermine Dev Team
  v1.0 originally written by Gregory Demar

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 3
  as published by the Free Software Foundation.

  ********************************************
  Coppermine version: 1.5.24
  $HeadURL: https://svn.code.sf.net/p/coppermine/code/trunk/cpg1.5.x/anycontent.php $
  $Revision: 8570 $
**********************************************/

/**
* This file gets included in index.php if you set the option on the configuration panel: "content of the main page".
* It can be used to display any content from any program, it is to be edited according to one's tastes.
*/

if (!defined('IN_COPPERMINE')) {
    die(
'Not in Coppermine...');
}

starttable("100%"$lang_index_php['welcome']);

echo <<< EOT
    <tr>
        <td class="tableb">
<div align=center><a href="http://inkscapecommunity.com/ic_gallery/displayimage.php?album=7&pid=352#top_display_media"><img src="http://inkscapecommunity.com/ic_gallery/albums/userpics/10001/normal_books2-2final.png" alt="featured image"></a></div>
<div align=center><b>Inkscape Dictionary</b><br>
by brynn</div>
        </td>
    </tr>

EOT;

endtable();

?>
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: show user galleries on front page
« Reply #13 on: January 27, 2015, 09:04:08 pm »

Add
Code: [Select]
starttable("100%", 'User galleries');
echo '<tr><td class="tableb">';
list_users();
echo '</td></tr>';
endtable();
before
Code: [Select]
?>
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: show user galleries on front page
« Reply #14 on: January 27, 2015, 09:30:05 pm »

Ok, yes, I like that even better!  And more user galleries will be automatically added there, as they are created?

I might guess that the original User Galleries list can't be removed?  Circled in red, in attached screenshot.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: show user galleries on front page
« Reply #15 on: January 27, 2015, 09:42:58 pm »

Re-install the toplevelusers plugin. Open codebase.php, find
Code: [Select]
                if (stristr($data[0],'User galleries')) {
                    break;
                }
and replace with
Code: [Select]
                if (stristr($data[0],'User galleries')) {
                    unset($cat_data[$splice_key]);
                    return $var;
                }
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: show user galleries on front page
« Reply #16 on: January 27, 2015, 11:40:44 pm »

Oh, that's absolutely gorgeous!  Thank you so much!!

In my next life, I think I'll be a hacker  ;D

So....as far as upgrades, I don't really have to remember this.  Only if the toplevel users plugin gets upgraded, right?  And as long as it works with 1.5x, it's not likely to be upgraded, right?

When I first posted this, I thought the answer was going to be 'no, there's no way to do it'.  So I'm overjoyed there was a way to do it!

Thanks again   :D
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: show user galleries on front page
« Reply #17 on: January 28, 2015, 02:20:49 pm »

Even if the plugin gets updated, you don't need to update it. Actually, most of the plugin code is now unused with our modification. But it was easier for me to tell you how to adjust the existing plugin instead of tell you how to create a new plugin that just remove the user galleries category. I'm sure this would also be possible with the theme engine, but this seemed to be the easiest way.
Logged

brynn

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Female
  • Posts: 198
    • Inkscape Commmunity
Re: show user galleries on front page
« Reply #18 on: January 29, 2015, 09:26:55 am »

Ok, thanks again   8)
Logged
Pages: [1]   Go Up
 

Page created in 0.029 seconds with 19 queries.