Forum Activity for @michael

michael
@michael
02/28/17 12:33:22PM
7,832 posts

No Ning/Ningja Downloads?


Ning To Jamroom

@isleander still dont know what the problems you're having are, just that you're having problems. If you could list the problems you're having that would help get them solved.

It looks like you have a custom skin and its header is not leaving enough space for the page body.
michael
@michael
02/28/17 12:30:42PM
7,832 posts

No Ning/Ningja Downloads?


Ning To Jamroom

Here's how it works now:
* Ninja is a skin created for users coming from Ning.
* Ning users are generally non-technical and don't want to look at code
* Site Builder is a system to allow non-technical users to construct pages without looking at code.

PREVIOUSLY:
The admin users of the Ninja skin, if they wanted to change the top page, had to do that in code OR re-build the entire page in Site Builder if they wanted to use site builder. If an admin user asked "How do I move that Latest Activity box to the right". The answer was "You have to rebuild that entire page in site builder in order to be able to drag-n-drop it, or you can do it in code"

CURRENTLY
The Ninja pages are created in Site Builder by default, so the reverse is true. Now you can just activate Site Builder and drag the Latest Activity to the right. If you want to do it in code, then you'd need to build the templates.

This pattern seams to be correct against the premise: Ning users are non-technical and don't want to look at code.

@strumelia, you already have your index.tpl built in code so it doesn't effect you. you dont need to activate Site Builder.

@isleander Site Builder is for building the site. You can still view the site from your iPad.
michael
@michael
02/28/17 01:44:16AM
7,832 posts

[BUG] Site / Page Builder Broken (jrElastic2?)


Design and Skin Customization

Looks like this might be it, you're missing a closing /script tag (screenshot)
this:
<script type="text/javascript">
    $(document).ready(function() {
        $('.index_form #user_email_or_name').prop('placeholder', 'user name or email');
        $('.index_form #user_password').prop('placeholder', 'password');
        $('.user_remember_element_right').append('remember me');
        });
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
should probably be:
<script type="text/javascript">
    $(document).ready(function() {
        $('.index_form #user_email_or_name').prop('placeholder', 'user name or email');
        $('.index_form #user_password').prop('placeholder', 'password');
        $('.user_remember_element_right').append('remember me');
        });
</script>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>

missing_closing.jpg missing_closing.jpg - 62KB

updated by @michael: 02/28/17 01:44:30AM
michael
@michael
02/28/17 01:40:51AM
7,832 posts

[BUG] Site / Page Builder Broken (jrElastic2?)


Design and Skin Customization

Anything in the console? javascript errors maybe?

Send us you admin login details to support at jamroom dot net and we can take a look. Include the link to this thread.

--
Can see one thing that may be related, on that page you have this error in the console:
SyntaxError: expected expression, got '<'
https://social.vixiv.net/SoulMechanic
Line 243
Added any scripts lately? (screenshot). Check they are wrapped in {literal}{/literal}

Docs: "{literal}{/literal}"
https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/3011/literal-literal
javascript_error.jpg javascript_error.jpg - 49KB
michael
@michael
02/28/17 01:12:22AM
7,832 posts

Amazon Linux: install gives error: jrCore_checktype: unable to load checktype plugins


Installation and Configuration

@vixivtech, you Rock!!! I couldn't come up with anything other than "Its something server related, check mod_rewrite"

soo glad you helped out on this one. Thanks. :)
michael
@michael
02/27/17 04:04:25PM
7,832 posts

How To Make Page Open On Specific Tab


Using Jamroom

We've got a solution in place for this in the next version. We're gearing up for the next big increment release of core to 6.1 so will hold off on releasing the Site Builder module until that comes out so that i can be certain its going to work as expected.

The way it will function is when you click a tab it will add the full url to that tab to the address bar:
yoursite.com
click on tab4 and the url will change to
yoursite.com#tab4

Then if you visit the site with that URL the tab will be selected.
michael
@michael
02/27/17 03:27:45PM
7,832 posts

Overriding lightbox2 options in a template


Design and Skin Customization

yes, working for me.

/lighbox-2.9.0.min.js
/**
 * Lightbox v2.9.0
 * by Lokesh Dhakar
 *
 * More info:
 * http://lokeshdhakar.com/projects/lightbox2/
 *
 * Copyright 2007, 2015 Lokesh Dhakar
 * Released under the MIT license
 * https://github.com/lokesh/lightbox2/blob/master/LICENSE
 */
if ($("#lightbox").length == 0) {
    !function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.lightbox=b(a.jQuery)}(this,function(a){function b(b){this.album=[],this.currentImageIndex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}return b.defaults={albumLabel:"Image %1 of %2",alwaysShowNavOnTouchDevices:!1,fadeDuration:600,fitImagesInViewport:!0,imageFadeDuration:600,positionFromTop:50,resizeDuration:700,showImageNumberLabel:!0,wrapAround:!1,disableScrolling:!1,sanitizeTitle:!1},b.prototype.option=function(b){a.extend(this.options,b)},b.prototype.imageCountLabel=function(a,b){return this.options.albumLabel.replace(/%1/g,a).replace(/%2/g,b)},b.prototype.init=function(){var b=this;a(document).ready(function(){b.enable(),b.build()})},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){var b=this;a('<div id="lightboxOverlay" class="lightboxOverlay"></div><div id="lightbox" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" /><div class="lb-nav"><a class="lb-prev" href="" ></a><a class="lb-next" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.$image=this.$lightbox.find(".lb-image"),this.$nav=this.$lightbox.find(".lb-nav"),this.containerPadding={top:parseInt(this.$container.css("padding-top"),10),right:parseInt(this.$container.css("padding-right"),10),bottom:parseInt(this.$container.css("padding-bottom"),10),left:parseInt(this.$container.css("padding-left"),10)},this.imageBorderWidth={top:parseInt(this.$image.css("border-top-width"),10),right:parseInt(this.$image.css("border-right-width"),10),bottom:parseInt(this.$image.css("border-bottom-width"),10),left:parseInt(this.$image.css("border-left-width"),10)},this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return 0===b.currentImageIndex?b.changeImage(b.album.length-1):b.changeImage(b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.currentImageIndex===b.album.length-1?b.changeImage(0):b.changeImage(b.currentImageIndex+1),!1}),this.$nav.on("mousedown",function(a){3===a.which&&(b.$nav.css("pointer-events","none"),b.$lightbox.one("contextmenu",function(){setTimeout(function(){this.$nav.css("pointer-events","auto")}.bind(b),0)}))}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})},b.prototype.start=function(b){function c(a){d.album.push({link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),a("select, object, embed").css({visibility:"hidden"}),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;i<f.length;i=++i)c(a(f[i])),f[i]===b[0]&&(g=i)}else if("lightbox"===b.attr("rel"))c(b);else{f=a(b.prop("tagName")+'[rel="'+b.attr("rel")+'"]');for(var j=0;j<f.length;j=++j)c(a(f[j])),f[j]===b[0]&&(g=j)}var k=e.scrollTop()+this.options.positionFromTop,l=e.scrollLeft();this.$lightbox.css({top:k+"px",left:l+"px"}).fadeIn(this.options.fadeDuration),this.options.disableScrolling&&a("body").addClass("lb-disable-scrolling"),this.changeImage(g)},b.prototype.changeImage=function(b){var c=this;this.disableKeyboardNav();var d=this.$lightbox.find(".lb-image");this.$overlay.fadeIn(this.options.fadeDuration),a(".lb-loader").fadeIn("slow"),this.$lightbox.find(".lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption").hide(),this.$outerContainer.addClass("animating");var e=new Image;e.onload=function(){var f,g,h,i,j,k,l;d.attr("src",c.album[b].link),f=a(e),d.width(e.width),d.height(e.height),c.options.fitImagesInViewport&&(l=a(window).width(),k=a(window).height(),j=l-c.containerPadding.left-c.containerPadding.right-c.imageBorderWidth.left-c.imageBorderWidth.right-20,i=k-c.containerPadding.top-c.containerPadding.bottom-c.imageBorderWidth.top-c.imageBorderWidth.bottom-120,c.options.maxWidth&&c.options.maxWidth<j&&(j=c.options.maxWidth),c.options.maxHeight&&c.options.maxHeight<j&&(i=c.options.maxHeight),(e.width>j||e.height>i)&&(e.width/j>e.height/i?(h=j,g=parseInt(e.height/(e.width/h),10),d.width(h),d.height(g)):(g=i,h=parseInt(e.width/(e.height/g),10),d.width(h),d.height(g)))),c.sizeContainer(d.width(),d.height())},e.src=this.album[b].link,this.currentImageIndex=b},b.prototype.sizeOverlay=function(){this.$overlay.width(a(document).width()).height(a(document).height())},b.prototype.sizeContainer=function(a,b){function c(){d.$lightbox.find(".lb-dataContainer").width(g),d.$lightbox.find(".lb-prevLink").height(h),d.$lightbox.find(".lb-nextLink").height(h),d.showImage()}var d=this,e=this.$outerContainer.outerWidth(),f=this.$outerContainer.outerHeight(),g=a+this.containerPadding.left+this.containerPadding.right+this.imageBorderWidth.left+this.imageBorderWidth.right,h=b+this.containerPadding.top+this.containerPadding.bottom+this.imageBorderWidth.top+this.imageBorderWidth.bottom;e!==g||f!==h?this.$outerContainer.animate({width:g,height:h},this.options.resizeDuration,"swing",function(){c()}):c()},b.prototype.showImage=function(){this.$lightbox.find(".lb-loader").stop(!0).hide(),this.$lightbox.find(".lb-image").fadeIn(this.options.imageFadeDuration),this.updateNav(),this.updateDetails(),this.preloadNeighboringImages(),this.enableKeyboardNav()},b.prototype.updateNav=function(){var a=!1;try{document.createEvent("TouchEvent"),a=this.options.alwaysShowNavOnTouchDevices?!0:!1}catch(b){}this.$lightbox.find(".lb-nav").show(),this.album.length>1&&(this.options.wrapAround?(a&&this.$lightbox.find(".lb-prev, .lb-next").css("opacity","1"),this.$lightbox.find(".lb-prev, .lb-next").show()):(this.currentImageIndex>0&&(this.$lightbox.find(".lb-prev").show(),a&&this.$lightbox.find(".lb-prev").css("opacity","1")),this.currentImageIndex<this.album.length-1&&(this.$lightbox.find(".lb-next").show(),a&&this.$lightbox.find(".lb-next").css("opacity","1"))))},b.prototype.updateDetails=function(){var b=this;if("undefined"!=typeof this.album[this.currentImageIndex].title&&""!==this.album[this.currentImageIndex].title){var c=this.$lightbox.find(".lb-caption");this.options.sanitizeTitle?c.text(this.album[this.currentImageIndex].title):c.html(this.album[this.currentImageIndex].title),c.fadeIn("fast").find("a").on("click",function(b){void 0!==a(this).attr("target")?window.open(a(this).attr("href"),a(this).attr("target")):location.href=a(this).attr("href")})}if(this.album.length>1&&this.options.showImageNumberLabel){var d=this.imageCountLabel(this.currentImageIndex+1,this.album.length);this.$lightbox.find(".lb-number").text(d).fadeIn("fast")}else this.$lightbox.find(".lb-number").hide();this.$outerContainer.removeClass("animating"),this.$lightbox.find(".lb-dataContainer").fadeIn(this.options.resizeDuration,function(){return b.sizeOverlay()})},b.prototype.preloadNeighboringImages=function(){if(this.album.length>this.currentImageIndex+1){var a=new Image;a.src=this.album[this.currentImageIndex+1].link}if(this.currentImageIndex>0){var b=new Image;b.src=this.album[this.currentImageIndex-1].link}},b.prototype.enableKeyboardNav=function(){a(document).on("keyup.keyboard",a.proxy(this.keyboardAction,this))},b.prototype.disableKeyboardNav=function(){a(document).off(".keyboard")},b.prototype.keyboardAction=function(a){var b=27,c=37,d=39,e=a.keyCode,f=String.fromCharCode(e).toLowerCase();e===b||f.match(/x|o|c/)?this.end():"p"===f||e===c?0!==this.currentImageIndex?this.changeImage(this.currentImageIndex-1):this.options.wrapAround&&this.album.length>1&&this.changeImage(this.album.length-1):("n"===f||e===d)&&(this.currentImageIndex!==this.album.length-1?this.changeImage(this.currentImageIndex+1):this.options.wrapAround&&this.album.length>1&&this.changeImage(0))},b.prototype.end=function(){this.disableKeyboardNav(),a(window).off("resize",this.sizeOverlay),this.$lightbox.fadeOut(this.options.fadeDuration),this.$overlay.fadeOut(this.options.fadeDuration),a("select, object, embed").css({visibility:"visible"}),this.options.disableScrolling&&a("body").removeClass("lb-disable-scrolling")},new b});
}
Then altered the include.php for jrCore to replace the 2.7.1 version, so that code above exists in the page.

Then I opened:
http://yoursite.com/admin/gallery/tall-images/all

clicked the lightbox. The very tall image was shown shrunk to fit the screen vertically.

I changed:
/modules/jrGallery/templates/item_gallery.tpl from this
                <div class="gallery_lightbox">
                    <a href="{$jamroom_url}/{$murl}/image/gallery_image/{$_items[0]._item_id}/1280" data-lightbox="images" title="{$_items['0'].gallery_alt_text}">{jrCore_icon icon="search2"}&nbsp;&nbsp;<h3>{jrCore_lang module="jrGallery" id="37" default="View images in Lightbox"}</h3></a>
                </div>
to this
                <div class="gallery_lightbox">
<script>
    lightbox.option({
      'fitImagesInViewport': false
    })
</script>
                    <a href="{$jamroom_url}/{$murl}/image/gallery_image/{$_items[0]._item_id}/1280" data-lightbox="images" title="{$_items['0'].gallery_alt_text}">{jrCore_icon icon="search2"}&nbsp;&nbsp;<h3>{jrCore_lang module="jrGallery" id="37" default="View images in Lightbox"}</h3></a>
                </div>
Then clicked the VIEW ALL IMAGES IN LIGHTBOX again. This time the image filled the screen horizontally and overlapped it vertically. Not really evident that it was in a lightbox, but I believe thats the goal.
michael
@michael
02/27/17 03:22:50PM
7,832 posts

Overriding lightbox2 options in a template


Design and Skin Customization

Replace the part inside the
if($("#lightbox").length == 0) {
// replace here with the minified version of 2.9.0 lightbox.min.js
}

That is in our codebase now for jrCore 6.1.0. Unless it causes issues it will be in the next major release.
michael
@michael
02/27/17 03:09:09PM
7,832 posts

Overriding lightbox2 options in a template


Design and Skin Customization

Looks like the best solution is for jrCore to update to v2.9.0
  258