Lightbox2 on simple html site (non WordPress) not working and I've tried almost everything - lightbox2

I can't seem to get the thumbnails I have placed on this page to open in the lightbox:
http://prussellartist.com/custom-leather-dog-collar-gallery2.htm
I tried changing the order and placement of these 2 elements:
<link rel="stylesheet" href="dist/css/lightbox.css">
<script src="dist/js/lightbox.js"></script>
At a glance is there anything wrong?

Please take a look at the JavaScript errors ... It seems like you forgot the fourth step of the getting-started guide (http://lokeshdhakar.com/projects/lightbox2/#getting-started) - namely - to include jQuery.

Related

Submit Order on Drupal 7 Custom Theme Redirects Back to Checkout Page

When I submit an order on my custom theme using ubercart on Drupal 7, I get redirected to the cart/checkout page again. The order shows up as being abandoned. The redirected is the checkout page again and has everything from the previous order but the full credit card information(last 4 digits and cvv). I am not getting an error messages that I am aware of after checking log files.
I tried adding the mytheme_uc_checkout_pane_cart_review function to my theme's template.php file as described on the documentation here to see if that helped, but that didn't seem to work. How could I fix this issue so the order goes through and gets to the completed order page.
In addition, I found another person having the same issue, but mind is not caused by a non-valid product. Link to that issue Here
Based on some looking The checkout works fine on the default theme Bartik 7.50. Thank you for any help!
I just have a similar problem with a very simple solution. Look in Reports > Recent log messages, if your page can find the js files: jquery-ui, jquery-x.x.x.min.js.
if not, you need to fix it.
In my case, I forget to put this in my [customtheme]/templates/html.tpl.php, that I have modified previously:
<script type="text/javascript" src="<?php print base_path() . path_to_theme() .'/' ?>js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="<?php print base_path() . path_to_theme() .'/' ?>js/jquery-ui.min.js"></script>

Having trouble with implementation

I have spent 2 hours + on the lightbox. I have checked paths to CSS and Javascript. I have used both the included jquery and Google's imported JQuery.
When I click an image it opens a new window with that image larger on a white background. I want it to overlay the current page with <> and x.
You can see an example: http://demopbdesignsource.tierstrategies.com/a.aspx
Thanks
Looking at your code on your page I do not see where you are calling the lightbox.js script - that needs to be called right before the body close tag.
Also lightbox help states : If you already use jQuery on your page, make sure it is loaded before lightbox.js. - â—¦Include the Javascript at the bottom of your page before the closing /body tag:
I used the lightbox-plus-jquery.js and called that just before the close of the body tag and it worked. I called the lightbox-plus-jquery.js just before the close of the body tag because it has both jquery and lightbox combined.
I am still working on the page and I am just using html not .net but the lightbox would work the same. If you look at my source you will see the script call right before /body tag.
http://just-in.com/recycledDresser/index.htm
Hope this helps.
Debra W.
You need to call the Lightbox script.
Something like
Placing it in the line before the line works for me.
Both
http://demopbdesignsource.tierstrategies.com/X/LightBox.css
and
http://demopbdesignsource.tierstrategies.com/X/LightBox.js
cannot be found.
The link provided in the question is giving 404 right now.
but I think you just need to follow the steps given at
http://lokeshdhakar.com/projects/lightbox2/
to set up lightbox.
you may have missed either of the following :
Include the CSS at the top of your page in your <head> tag:
<link href="path/to/lightbox.css" rel="stylesheet">
Include the Javascript at the bottom of your page before the closing </body> tag:
<script src="path/to/lightbox.js"></script>

How to add a link rel code in Drupal 7?

I am a new developer and I want to implement a popup screen in Drupal 7.
I found a code online and it works, except for the "link rel" code the example has at the <head> section.
The code is the following:
<link rel="stylesheet" href="http://www.jacklmoore.com/colorbox/example1/colorbox.css" />
I tried opening this link and adding the whole code at the styles.css file, but the popup appears without any style.
Is there a way to do it correctly?
If you added the CSS content to your CSS file maybe you should clear the CSS cache to see changes.
You also should check the selectors match to the CSS rules (for instance with Firebug in Firefox browser).
Or in the template.php you can add external CSS in this way:
function mytheme_preprocess_html(&$variables) {
`drupal_add_css('http://www.jacklmoore.com/colorbox/example1/colorbox.css',`
`array('type' => 'external'));`
}

OnsenUI keeps using unsafe-eval and unsafe-inline, even with the ng-csp directive

EDIT :
I've submitted the issue to their GitHub : https://github.com/OnsenUI/OnsenUI/issues/936
EDIT 2 : It's being taken care of ;)
(Sorry for my English, it's not my native language ;) )
This is my first question on stackoverflow. For now, I've always find that someone else have had the same problem as me, and got an answer.
But this time, I can't seem to find a solution, so either I'm the first one, or I'm missing something.
I'm developing a app for Windows Phone and Android (for now), using cordova, onsenui (so angular), and jQuery (thought I don't think this last one is causing trouble here).
I decided that I'll start using CSP the right way, to get a more secure app.
I've added <meta http-equiv="Content-Security-Policy" content="default-src 'self' http://foo.com> in the index.html page, to start with.
I've found that angular does a lot of unsafe things, and I learned about the ngCsp directive.
So now I have :
<html ng-app="app" ng-csp>
<meta http-equiv="Content-Security-Policy" content="default-src 'self' http://foo.com>
<script src="lib/onsen-1.3.10/js/angular/angular.js"></script>
<script src="lib/onsen-1.3.10/js/onsenui.js"></script>
...
</html>
I don't get anymore CSP's errors about angular.js, but I keep getting some for onsenui.js (unsafe-inlines and unsafe-evals).
For know, the only solution I've found is :
to allow unsafe-inline in CSP
to arrange the only line in onsenui.js that causes an unsafe-eval :
In onsenui.js, I've replaced line 4888 :
}(new Function("return this")()));
by :
}(function() {return this;}()));
So my question is : am I the only one out there having this problem ? Does someone here is using cordova, onsenui, and CSP without any problem ?
I'd rather not put 'unsafe-eval' in the CSP meta, and I'd like to remove the 'unsafe-inline'.
Sorry for this long post, and thank you for your help ! ;)

Changing icon and title of partial trust WPF xbap

I've been fiddling with a partial trust XBAP - how can I change the icon shown in the IE-tab and the title (aside from changing the assembly-name in the project properties)?
I would also like to change what is shown in the Internet header (right now it shows the address of the XBAP.
I had a similar issue where I could not change the title in IE 10 (this was the first stack overflow answer that comes up when you Google "xbap title"). I found the solution here:
In code, set Application.Current.MainWindow.Title to the title you want to show. This worked for me, hopefully this will be helpful for the next guy.
Load your XBAP from a HTML page using an IFRAME. In the HTML page add a title and icon.
Something like this:
<html>
<head>
<title>This is my title</title>
<link rel="shortcut icon" href="http://wherever.com/icon.ico">
</head>
<body>
<iframe location="something.xbap"
style="width:100%; height:100%; border:0; overflow:auto" scrolling="no"></iframe>
</body>
</html>
This is simplified from code that I actually use, except due to some other requirements I'm giving the iframe an id and setting its location using JavaScript in the body's onload event. I assume the above will work just as well.

Resources