Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Suggestion on Skin Concept  (Read 6041 times)

0 Members and 1 Guest are viewing this topic.

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 244
Suggestion on Skin Concept
« on: February 25, 2013, 08:06:18 pm »

Hey folks, I haven't visited in awhile but looks like ya'll are staying busy.  Keep up the good work!  :)

I'd like to start a new Coppermine gallery, but I'd like the theme to be completely stripped of categories and albums (although they can still work in the backend).  All I want is a single, random, large-size image for people to vote.  Once a user votes, another single, random, large-size image appears.  It would be almost like Coppermine's displayimage.php but the pictures would be in random sequence. 

Can this be done with any current skin or setup?  I know Coppermine isn't originally set up this way, but I like this photo gallery software the most and I trust it.  I'm looking into JAlbum and Piwigo (but I feel dirty for cheating on Coppermine  :-[)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15759
Re: Suggestion on Skin Concept
« Reply #1 on: February 26, 2013, 09:29:59 am »

You don't want to provide any other elements than just this
single, random, large-size image
right?

I assume the easiest way would be to use something like the attached file as index.php file. We'd need to add
Once a user votes, another single, random, large-size image appears.
depending if you prefer to use the old or new rating system.
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Suggestion on Skin Concept
« Reply #2 on: February 26, 2013, 11:31:49 am »

Hi Andre,

Whoo I'm excited!  I tried out your index.php -- yes this is exactly what I want!  ;) ;) I'm not really sure about the difference between the old and new rating system, but I'm guessing new one would be better.  If possible, I would like the voting to automatically trigger the next picture so that once you vote, the page automatically refreshes to the next picture. 

You can see it in action at my Test Gallery: www.adonismale.com/tg/
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15759
Re: Suggestion on Skin Concept
« Reply #3 on: February 26, 2013, 12:30:49 pm »

I just noticed that $RESTRICTEDWHERE is empty in my provided index.php file (which is actually almost a one-to-one copy of displayimage.php). To fix any permission issues, you should find
Code: [Select]
$pid = mysql_result(cpg_db_query("SELECT pid FROM {$CONFIG['TABLE_PICTURES']} $RESTRICTEDWHERE ORDER BY RAND() LIMIT 1"), 0);and replace with
Code: [Select]
get_meta_album_set(0);
$pid = mysql_result(cpg_db_query("SELECT pid FROM {$CONFIG['TABLE_PICTURES']} AS r $RESTRICTEDWHERE ORDER BY RAND() LIMIT 1"), 0);


I would like the voting to automatically trigger the next picture so that once you vote, the page automatically refreshes to the next picture.
Open js/displayimage.js, find
Code: [Select]
        displayStars();(inside the function rate) and below, add
Code: [Select]
        window.location.href = 'index.php';
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Suggestion on Skin Concept
« Reply #4 on: February 26, 2013, 02:29:09 pm »

Whoooo -- this is beautiful!  I've made the changes you suggested and it's stunning.  You can check out my demo here: http://adonismale.com/tg/index.php

Okay, two more minor enhancements:
1) What if I'd like to show the picture description underneath?  (And by the way, does CPG allow links in descriptions?)
2) What if I'd like to show the average rating underneath?   

For anybody else who would like to replicate these settings, see attached files.  Instructions:
1) Upload and over-write index.php into your server's main coppermine/ folder
2) Upload and over-write displayimage.js into coppermine/js/ folder
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15759
Re: Suggestion on Skin Concept
« Reply #5 on: February 26, 2013, 02:47:37 pm »

Your demo gallery is password protected.

Whoooo -- this is beautiful!  I've made the changes you suggested and it's stunning.  You can check out my demo here: http://adonismale.com/tg/index.php
1) What if I'd like to show the picture description underneath?
2) What if I'd like to show the average rating underneath?   
That's default behavior.


does CPG allow links in descriptions?
You can use the BBCode tag url.
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Suggestion on Skin Concept
« Reply #6 on: February 26, 2013, 03:10:10 pm »

Mmm, I'm not sure how to get around the password protection.  I'm bridging with IPB so it's kind of weird, but maybe just try to go to the link again:
http://adonismale.com/tg/index.php.  All I can say is that it's stunning  ;)

I figured out in the Config how to show ratings.  Thanks. 

This project is /resolved.  Thanks for all of your help Αndré

P.S.  You might want to package this into a "CPG Slideshow" as a skin or something. 
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Suggestion on Skin Concept
« Reply #7 on: February 27, 2013, 05:41:54 am »

You can check out the working demo here:
http://adonismale.com/tg/index.php

(Allowed multiple votes according to thread here)

Also disabled bridging so people could actually see how beautiful it is. 
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Suggestion on Skin Concept
« Reply #8 on: March 01, 2013, 04:25:00 pm »

Hi Andre,

I need another fix to the index.php page: it really needs to show the anycontent file.

Please advise. 

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15759
Re: Suggestion on Skin Concept
« Reply #9 on: March 01, 2013, 04:33:06 pm »

Add
Code: [Select]
include('anycontent.php');before or after
Code: [Select]
theme_display_image($nav_menu, $picture, $votes, $pic_info, $comments, $film_strip);depending where it should be displayed.
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Suggestion on Skin Concept
« Reply #10 on: March 16, 2013, 02:47:31 am »

Hey Andre,

Would it be possible for you to make a minor modification to the index.php page?  I've noticed that the voting is so far down, it requires the user to scroll down on the page.  (You don't need to scroll down a lot, but you still need to scroll down.  This adds an extra action to the user, and it would be a lot smoother in terms of the overall experience if it could be bypassed).  Thus, I was wondering if you could move the voting *above* the picture, and add commenting beneath it. 

I tried to copy and paste and move stuff around myself.  That didn't work out so well.   :-\

Attached: index.php
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15759
Re: Suggestion on Skin Concept
« Reply #11 on: March 19, 2013, 11:24:20 am »

I'm not sure where the comments should be placed. Above or below the picture?
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Suggestion on Skin Concept
« Reply #12 on: March 19, 2013, 03:26:08 pm »

Votes above

Comments Below
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15759
Re: Suggestion on Skin Concept
« Reply #13 on: March 19, 2013, 05:08:43 pm »

Copy the function theme_display_image from themes/sample/theme.php to your theme's theme.php file, if it doesn't exist. Then, find
Code: [Select]
    starttable();
    echo $picture;
    endtable();
    if ($CONFIG['display_film_strip'] == 1) {
        echo $film_strip;
    }


    echo $votes;
and replace with
Code: [Select]
    echo $votes;

    starttable();
    echo $picture;
    endtable();
    if ($CONFIG['display_film_strip'] == 1) {
        echo $film_strip;
    }

As you can see it's a very simple mod by just moving one line. It's also possible to copy the function directly to your index.php file, but this is not recommended as you'll get an error message if your theme's theme.php file also contains that function.
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Suggestion on Skin Concept
« Reply #14 on: March 19, 2013, 05:33:26 pm »

Thanks!
Logged
Pages: [1]   Go Up
 

Page created in 0.031 seconds with 21 queries.