Piwigo.org

You are not logged in. (Register / Login)

Announcement

Post a reply

Write your message and submit

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

mistic100
2011-12-18 22:53:32

I've duplicate what is done in admin.php http://piwigo.org/dev/changeset/12764#file2
it reads $_SESSION['page_infos']) and $_SESSION['page_errors']) vars

plg
2011-12-18 22:53:22

I've reviewed the patch by mistic100 (and it was commited in [Subversion] r12764), I agree with this changes: it makes the code on gallery side equivalent to admin side, regarding errors/infos display.

P@t
2011-12-18 22:45:10

I also want to add a session variable to save info or error message to be displayed after a redirection.
Maybe this can be done throught a function...

We can also make an easy way to add dynamic message with jQuery (after an ajax request for example...)

mistic100
2011-12-18 22:39:59

[Bugtracker] bug 2538

well I didn't think to add fonctionnalities but rewrite the existing one

what the interest of display MySQL errors ? in most cases the engine just said there is a syntax error with an approximative location (very very approximative)
and in thoses cases the corresponding php script crashes with enough info (not less that mysql provides)




ouch I don't understand what I say ! but yeah I don't like MySQL error reporting :)

flop25
2011-12-18 19:37:55

yep it's much better if it could be a .tpl.

Could we integer also the mysql error in it ? Is there a way to catch them ? Then we would be able to filter the type of message displayed if is_admin or not

mistic100
2011-12-18 16:30:10

After test, the display is better if messages are in the #content block, so I've put the messages template in a file messages.tpl included in ALL page (even where we don't need messages in the core)

mistic100
2011-12-18 15:43:09

Hello,

I think we must modify how Piwigo gets and displays messages (infos, errors).
Currently if a page needs to display it adds it to $page['infos'] or $page['errors'], assign it to the template...

But not all pages have the necessary vars and template part, what is a shame for pugins (I've done very bad stuff in Subscribe to Comments ^^)

My idea is to add a unified messages system :
- all messages templates are moved to header.tpl
- when we need to add a message we adds it to $page['infos'] or $page['errors'] (initiliazed in common.inc.php allowing to use array_push without any test) as before
- these array are assigned to the template in page_header.php

What do you think ?

I've also a question about messages : in header.tpl there are $header_msgs and $header_notes, but the display is the same, why two arrays ?

Board footer

Powered by FluxBB

About this website · Donate · Contact Piwigo project © 2002-2013