Hi
@plg: as you were one to make all the changes since 2012, it would probably question for you
Please take a look at discussion here: http://piwigo.org/forum/viewtopic.php?p … 45#p156145
issue is how PayPal plugin tries to incorporate itself into the page/template
there are a lot of assumptions made on how page *template* is structured
instead of making insertion based on generic smarty tags or some core elements used in the potential page template there is a search and replace for #<.*\"infoTable\".*># or isset($COMMENT_IMG) for example and placing all the code in that place
for my theme, paypal would appear if you do use "icons with overlay" mode only because it would be first occurrence of the pattern
Relaying on the placement if element is problematic as, for example in my case paypal code is breaking structure of <ul> element which is many cases simply not visible
I can full the plugin into thinking that there is some empty <div class="infoTable"> element somewhere, but would it be right way to do it?
Offline
Hi Serge D,
Serge D wrote:
@plg: as you were one to make all the changes since 2012, it would probably question for you
Yes I maintain [extension by plg] PayPal Shopping Cart
Serge D wrote:
Relaying on the placement if element is problematic as, for example in my case paypal code is breaking structure of <ul> element which is many cases simply not visible
This is the way Piwigo works with smarty prefilters.
Take a look at [Forum, topic 23228] Thoughs about new template-plugin interaction (we know that the way prefilters work is problematic when you have to deal with completely different structure in HTML structures)
Offline
ok, no problem, for now I did code PayPal support in by fooling it into inserting code into special place and ignoring others
So we good for now
On that other discussion, what is the reason behind not going with "blocks" idea for widgets. Discussion was going back in forth all over the place, so I want to focus on the content "blocks" or "widgets" instead.
Let me try to present the argument for
Some of it comes from G3, some from WP and some other discussions around it we have had
* this does not violate Smarty model as simply require compartmentalize code
* lets consider widget being piece of confined content - div - with all necessary parts in it.
* widget would be inserted into widget area - get_blocks() or get_widgets() extension in the smarty template
* widget need to be able target page type - ex: picture page vs album page
* theme developer has ability to place "widgets" panel anywhere in the page and style it easily or hide by simply managing placement of get_blocks()
* in case of photo page, metadata, description, tags, Exif, comments - all become respected "widgets" and can individually maintained
* if you go further, you can allow organization/order/visibility of widgets being managed by admin
* this way we remove headache of "how to insert my code (ex: paypal) into page" and targeting would be very clear and easy to accomplish
Offline