Timbalu wrote:sometimes its hard to follow your thoughts...
Yeah, well, if you don't tell me how to check the value of foundImageLink, I'll try it myself. (I even stated that I only attempted to find out the value and wasn't sure if it was correct.)
Timbalu wrote:Where did you check this output in detail?
I though that
Code: Select all
data-link="' . $this->foundImageLink .'">
would emit the value of foundImageLink for the current page (as the value of that data-attribute, which I added myself since I did not know where or how to emit it). The results of this (meaning the value of data-link) are either 1 or nothing, but not true or false.
Timbalu wrote:It is unusual, since foundImageLink should only be false or true, defined by the count of regex replacements.
According to your last post the whole thing “should work”. But it does not.
Timbalu wrote:If you have links that are written in an unsual condition, eg by adding extended attributes to a link like »data-link=""« this would IMHO need to change the regex part, since that changes the replacement order*.
I have no idea what you're talking about. The only thing I did was append a data-attribute to the script element that includes magnific popup to have a place to (what I assumed to be) foundImageLink. I did not add anything to the image links.
To make this as clear as possible: I added some code to serendipity_event_lightbox.php that changes
Code: Select all
<script type="text/javascript" src="/plugins/serendipity_event_lightbox/magnific-popup/jquery.magnific-popup.min.js" charset="utf-8"></script>
to
Code: Select all
<script type="text/javascript" src="/plugins/serendipity_event_lightbox/magnific-popup/jquery.magnific-popup.min.js" charset="utf-8" data-link="<VALUE>"></script>
where <VALUE> is $this->foundImageLink. <VALUE> is either 1 or empty.
Timbalu wrote:PS. Where does the data-link come from...? Maybe you should test without these sidebars social sprite widgets once.
A. I just told you where it comes from. It was added by me to find a way to check the value of foundImageLink.
B. I already tested all this with 2k11, Next and clean-blog which do not emit the social icons at all (because they're part of my theme). It has nothing to do with that, the lightbox assets are still emitted.
YL