Announcement

  •  » Requests
  •  » Controlling who sees ratings & a small tweak

#1 2013-05-30 17:20:54

Anonymouse
Member
2013-05-30
12

Controlling who sees ratings & a small tweak

Hello,

I have two questions for the Piwigo team and other devs!

1st question:

On my site (http://aclcontest.arabelladesign.com/photos/) I have made it so that only registered users can vote but I would like users to not see the totals/average until they have voted (so that they are not influenced). This is a similar thread to one discussed here:

http://piwigo.org/forum/viewtopic.php?id=13981

But I cannot implement the coding mentioned and am concerned as the thread dates to 2008 and there have probably been major changes since.

2nd question:

Once you create an album and put photos inside it Piwigo creates the album for example "Andrew McDermott" and below it it says "X number of photos". Is there anyway to change the word photos to something else? (Screenshot attached)

Thank you!

AM

Offline

 

#2 2013-05-30 18:14:05

flop25
Piwigo Team
2006-07-06
7037

Re: Controlling who sees ratings & a small tweak

Hello
1   you will have to do a plugin to control
2   check out Localfiles editor and its language tab


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2013-05-30 20:53:02

Anonymouse
Member
2013-05-30
12

Re: Controlling who sees ratings & a small tweak

Hi Flop,

Thanks for the quick answer.

#1
While I'm pretty good with computers I'm not familiar with php and wouldn't know how to write a plugin. Has there been any development since 2008 on this thread? Could I duplicate what rherzog did? (http://piwigo.org/forum/viewtopic.php?id=13981)

#2
I'm currently using this (some of your work from another thread) to modify some of the language.

$lang['Albums'] = "Artists";

$lang['Identification'] = "Login Details";

Is there a way to do the same with the photos sub heading? Firebug shows it as "Nb_images" but I wouldn't know where to start.

AM

Offline

 

#4 2013-06-01 15:31:58

Anonymouse
Member
2013-05-30
12

Re: Controlling who sees ratings & a small tweak

Hi again,

Does any one have any other suggestions? While the rating question might be a little complicated, could someone help me with the Language one (question 2)?

Thanks,

AM

Offline

 

#5 2013-06-01 16:11:13

pewe
Member
2012-03-16
439

Re: Controlling who sees ratings & a small tweak

Have a look in the Admin=>Localfiles Editor=> Language tab.
Select the correct language to edit - and paste the following

$lang['%d photo'] = "%d photo";
$lang['%d photos'] = "%d photos";

Changing photo/photos to the words you want.

See the attached screenshot

Last edited by pewe (2013-06-01 16:18:03)

Offline

 

#6 2013-06-01 16:26:13

Anonymouse
Member
2013-05-30
12

Re: Controlling who sees ratings & a small tweak

Hi pewe,

Thanks I made the changes and they work perfectly! Do you have any thoughts on how I can control the ratings/star system? Hasn't anyone ever wanted to run a photo contest from within their gallery or needed to modify the ratings in some ways?

AM

Offline

 

#7 2013-06-01 20:51:17

pewe
Member
2012-03-16
439

Re: Controlling who sees ratings & a small tweak

Sorry Anon,
But I am not a coder so can't really help with the voting thing.

As flop says, it will need a plugin I feel.
You first have to record for each registered user that they have voted, and record a vote for each voting option, then before displaying any votes it will require checking for the item concerned if the viewer is registered and logged in if they have voted already for that item etc etc - so not too simple.

Offline

 

#8 2013-06-02 14:42:41

Anonymouse
Member
2013-05-30
12

Re: Controlling who sees ratings & a small tweak

Ok we'll have to work around #1 for now. Thanks for the help you two.

AM

Offline

 

#9 2013-06-03 17:54:55

Anonymouse
Member
2013-05-30
12

Re: Controlling who sees ratings & a small tweak

Hi pewe & Flop,

Thanks for your help with my site issues, can I ask you guys one more language/php question? Rather than a plugin to deal with issue #1 I realize it would simply be easier to hide the image rating score line. Only admins will need to see the totals to declare a winner and we can do that through the back-end.

Can you let me know what code to put in the language section? I'd really appreciate it.

Thanks!

AM

Offline

 

#10 2013-06-03 18:45:42

pewe
Member
2012-03-16
439

Re: Controlling who sees ratings & a small tweak

Not sure if I understand what you are asking - but

to turn off the visibility for the rating score for everyone you uncheck the option in
Administation=>Options and use the 'Display' tab.
(Leave the rating option checked in the 'Main' tab.)

Offline

 

#11 2013-06-03 19:02:19

Anonymouse
Member
2013-05-30
12

Re: Controlling who sees ratings & a small tweak

:lol: where's the "doh" smily! Thanks again!

Offline

 

#12 2013-06-03 22:29:46

Anonymouse
Member
2013-05-30
12

Re: Controlling who sees ratings & a small tweak

Hi again...

Is it possible to customize the comment form labels? I'd like to put "Your" in front of "Website" to make it less confusing. I've been using firebug to ID the element but cant seem to find forms.css to which it seems to belong.

Thanks Piwigo-team!

AM

Offline

 

#13 2013-06-03 23:57:06

pewe
Member
2012-03-16
439

Re: Controlling who sees ratings & a small tweak

Hi Anon

It's in your language file again.

Put this in the Localfiles Editor after the previous entries listed above

$lang['Website'] = 'Your Website';

Offline

 

#14 2013-06-04 00:08:57

Anonymouse
Member
2013-05-30
12

Re: Controlling who sees ratings & a small tweak

Hi pewe,

Thanks! I understand the basic syntax of the language modifications but how do you identify the object's name? I think if I understand that I'll avoid asking you future questions... :)

AM

Offline

 

#15 2013-06-04 00:20:24

pewe
Member
2012-03-16
439

Re: Controlling who sees ratings & a small tweak

I don't identify the syntax -
what I do is open the language file in a text editor (I use EMEditor) and search for the word I want to change (eg Website). I then copy the complete line from the file into the LocalFiles Editor, change the words and save the file, then check if it changed what I wanted.

The cautionary note is that the same word may be used elsewhere on the site and changing it may not be right for the other places if it is used elsewhere. So checking other places is obviously advised.

Offline

 
  •  » Requests
  •  » Controlling who sees ratings & a small tweak

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact