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: having custom error messages?  (Read 3660 times)

0 Members and 1 Guest are viewing this topic.

zzz

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
having custom error messages?
« on: January 19, 2006, 03:19:55 am »

hi i require a few things to keep my users from being confused, im running an un-modded cpg 1.4.3 stable bridged with phpbb 2.0.19.

i have edited my coppermine index to not display anything, i have used theuser's album by url htaccess method  to allow nicer urls to my users galleries, i have bridged cpg with phpbb perfectly and i have a solution for users to see other users galleries via the profile page of phpbb.

alls great except if i visit a link say : www.mysite.com/gallery/idontexist , and that user does not exist,  im just shown my blank index and no explanation, just as if i visit www.mysite.com/gallery/idoexist and that user exists but has not uploaded anything yet.

ideally id like a couple of messages for those situations, can anyone help?

(apologies for not including my cpg version previously and thanks for any advice or pointers you may be able to give me)
« Last Edit: January 20, 2006, 05:11:32 pm by zzz »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: custom error messages???
« Reply #1 on: January 19, 2006, 06:05:44 pm »

we don't know what rewrite/redirection hacks you applied, so how could we possibly answer this? You'll have to modify your rewrite/redirection script accordingly, that's all I could recommend.
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: custom error messages???
« Reply #2 on: January 20, 2006, 12:47:28 am »

Please stick to one question per thread.  For each question, if you are using a standard (un-modded) Coppermine installation, then say which version and describe your question carefully.  If you have modded or added-on things to Coppermine, you need to describe everything very carefully and realize that it's possible that not many people have the exact same setup, so it might be up to you to solve the problem and contribute your solution to the community.

Keep your questions as simple & direct as you can, and keep them in separate threads, preferably adding the questions that are relevant to other threads to those threads, or reference them explicitly in your new threads.
Logged

zzz

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
custom error messages
« Reply #3 on: January 20, 2006, 08:33:04 pm »

apologies didnt think you were going to look at this old thread:

http://forum.coppermine-gallery.net/index.php?topic=26664.0

i have ammended my question,
Logged

Nibbler

  • Guest
Re: having custom error messages?
« Reply #4 on: January 20, 2006, 08:40:16 pm »

Ask questions about mods on the thread dealing with that mod.
Logged

zzz

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: having custom error messages?
« Reply #5 on: January 20, 2006, 11:11:19 pm »

apologies

this has nothing to do with those said mods - the htaccess file redirects me to the index file to which i have this issue:

i noticed the issue when i had removed everything off my index page via the admin panel:

normally if on the index page and everything is displayed , the word "No image to display" will show up in the
"Random files, Last additions" section if theres is no images, now the same applies when visiting a users personal gallery, only difference being that if i remove "Random files, Last additions", i dont have any messages at all...

now like i said this is a problem for me as it currently stands as if a user visits a link to a profile that doesnt exist they get a blank page and if they visit a profile of someone who hasnt uploaded anything they too get the blank page - my point being is that the "Random files, Last additions" sections are kind of being used to deal with that - id like some error message text.

does this makes sense?

my coppermine if visited ordinarilly is a blank index page, and quite a stripped down look and feel, this isnt a problem for me as i will probably have a portal of some sort to act as my index page,, but as im sure you can see if people cant understand whats gone wrong when they hit the two problems above they will be stuck looking at a blank page. :(
« Last Edit: January 20, 2006, 11:34:35 pm by zzz »
Logged

Nibbler

  • Guest
Re: having custom error messages?
« Reply #6 on: January 20, 2006, 11:37:18 pm »

I see.

Edit index.php, find

Code: [Select]
if (!$nbAlb) return;

change to

Code: [Select]
    if (!$nbAlb) {
theme_no_img_to_display();
return;
}
Logged

zzz

  • Coppermine newbie
  • Offline Offline
  • Posts: 12
Re: having custom error messages?
« Reply #7 on: January 21, 2006, 02:35:01 am »

that works fine, thankyou.

one slight problem is if i visit the album of someone who does not exist i get the same "no images" message, now ideally i want to show the message "that user does not exist", so that if someone accidentally makes a typeo they wont assume that the user has no pics and just move on to doing something else + other possible scenarios..

is this do-able?

thankyou for your support in this matter.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 20 queries.