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 [2]   Go Down

Author Topic: I'd like to encourage guests to sign up when they want to view full size images  (Read 15174 times)

0 Members and 1 Guest are viewing this topic.

elwave

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 120

Have a look at the function theme_html_picture in the theme.php file of your theme. If it doesn't exist, copy it from themes/sample/theme.php to your theme's theme.php file.

You'll find that line
Code: [Select]
$pic_html .= '<a href="javascript:;" onclick="alert(\''.sprintf($lang_errors['login_needed'],'','','','').'\');">';which you can change to your needs, e.g. to open a new page with more information instead of just opening a small popup.

ok, I edited my themes theme.php file and added that section :)

I then changed that line to read
Code: [Select]
$pic_html .= '<a href="http://www.sonichentai.net/forum/member.php?action=login">';
However, it's still throwing the same popup window. Is there another change I have to make to tell the theme to use this new section?
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page

Please, in the future (or present), for better support and testing, set up a test gallery if you are concerned about your content and users.

I then changed that line to read.....$pic_html .= '<a href=......
Look again at the line...it uses a .js function. You should do the same.
Use the window.open function. I could post a snip, but you should choose/create
what you want yourself.
See this page: http://www.w3schools.com/jsref/met_win_open.asp
and http://www.w3schools.com/jsref/event_onclick.asp

However, it's still throwing the same popup window. Is there another change I have to make to tell the theme to use this new section?
That would depend more on your browser - make sure you clear your cache as a page refresh does not work with some inferior browsers.



Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764

Code: [Select]
$pic_html .= '<a href="http://www.sonichentai.net/forum/member.php?action=login">';
Look again at the line...it uses a .js function. You should do the same.
What's the advantage of using JS instead of a simple link?
Logged

elwave

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 120

What's the advantage of using JS instead of a simple link?

My thoughts exactly Αndré! It's only a link :)
Logged

elwave

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 120

Oh, also, of course I would imagine the cache is always refreshed as i am running Chrome in incognito mode when I try to access my gallery as a guest.

I also just tried it in a browser with an empty cache (and everything else) - the latest Opera - and I still got the popup.

I wonder what I should edit to make it use this new section instead, I suppose it has to be some kind of pointer in the code of the theme. I'll be having a look, but if you guys know what it might be it might make it a bit more speedy for me! hehe

It's great that this is so close to working though! This should really give my forum sign-ups a boost! ^_^

(I had a system not dissimilar to this about a year ago that happened totally accidentally - hence I can't duplicate it easily! It increased my daily members by about 150!!! ^_^ )
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764

I again cannot access your gallery. I wonder why you're scared to open the intermediate-sized view to guests, as that's exactly what your goal is?


I wonder what I should edit to make it use this new section instead, I suppose it has to be some kind of pointer in the code of the theme. I'll be having a look, but if you guys know what it might be it might make it a bit more speedy for me! hehe
There's no pointer. If the code exists in your theme.php file, it will be used. Please attach your theme.php file to your next reply.
Logged

elwave

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 120

ok man :)

And sorry I'm still leaving it as thumbnails only, it's literally because the way we get floods of sign-ups every day is very fragile, and it depends on the traffic of the gallery and how enticed they are to sign-up.

Here is the theme.php file:

http://sonichentai.net/gallery/themes/eyeball/theme.txt
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page

What's the advantage of using JS instead of a simple link?

The thought was to change the pop up options (make it bigger, with links, etc.) so that the visitor would not lose the page...

After second thought the same thing could be done much easier by putting the link/page into a greybox.  :)

If I were to make the change myself that is the way I would do it.....  :)

elwave

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 120

You know, even making the Register link a little more visible on the login page increased our daily onlines from 210 to approaching 250 and beyond! With this gallery change, I predict we may hit 400 or higher! I can't WAIT! ^_^
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764

Can you please explain once more what exactly you want to accomplish? Your initial question was:
well, basically, when someone clicks a thumbnail image, and is not allowed to view "intermediate" images, it takes them to the sign in page (which is on my MyBB forum, as the two are bridged). I'd like to ideally make it so that this happens instead when they are on the intermediate image already, and click on it to view the full image.

If that still applies, allow guest access to your intermediate-sized view.
Logged

elwave

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 120

Can you please explain once more what exactly you want to accomplish? Your initial question was:
If that still applies, allow guest access to your intermediate-sized view.

Yes that's still my goal :)

I'll enable guest access to intermediate images so you can take a look at what's going on:

http://www.sonichentai.net/gallery/displayimage.php?album=315&pid=6546


Thank you, and sorry this is taking a little while! It will be so great to watch my onlines skyrocket though! ^_^
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764

Please have a look at your theme.php file. There's a second occurrence of
Code: [Select]
$pic_html = '<a href="javascript:;" onclick="alert(\''.sprintf($lang_errors['login_needed'],'','','','').'\');">';you need to replace with your code.
Logged

elwave

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 120

Please have a look at your theme.php file. There's a second occurrence of
Code: [Select]
$pic_html = '<a href="javascript:;" onclick="alert(\''.sprintf($lang_errors['login_needed'],'','','','').'\');">';you need to replace with your code.

haha yes it works! Thank you soooo much you're legend! I can't believe I didn't see that, I just.. I guess it didn't occur to me that it might be as simple as it being mentioned twice, I thought I'd have to sort out some complex way of including this new code!

Ok, well, I guess that's it! I'll add a bit of text or some kind of information box to say that a guest must be logged in to view full images (otherwise they may not understand why clicking an image takes them to a login page) and... then I'm done!

Thanks again, that was very helpful and I'm very sorry to take up so much of your time! I will recommend Coppermine Gallery to everyone who asks me about this stuff and support you guys! hehe

See you round I guess! Is there anything else I can do to say thanks? :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764

Is there anything else I can do to say thanks? :)
You could write a positive review here or simply
tag your answer as "solved" by clicking on the little image in your initial posting on your thread.
;)
Logged

elwave

  • Coppermine frequent poster
  • ***
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 120

Done and done! :)


Also, when I actually have money, I'll donate a bit to the project (whatever I can as I'm poor! hehe)
Logged
Pages: 1 [2]   Go Up
 

Page created in 0.027 seconds with 20 queries.