1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Download Hotaru Cms Core 1.7.3

Main Core code for Hotaru CMS

  1. nothingman

    nothingman Active Member

    When I talk of spaces, I'm looking at posts which have a content like the following (notice the spaces before the first word, 'There'). Also, this doesn't happen in with comments but it happens with posts.

    In my native language we too have 'marks' that look like the Umlaut. For example, â <- whenever someone posts this mark(?), the � character shows up. As I said, this does not happen on comments but on posts.

    Not complaining but since you guys brought up this topic, just thought I'd pitch in too :eek:

    - - - Updated - - -

    When I talk of spaces, I'm looking at posts which have a content like the following (notice the spaces before the first word, 'There'). Also, this doesn't happen in with comments but it happens with posts.

    " There was a time when people really had a way with words. They said and did whatever they could.

    In my native language we too have 'marks' that look like the Umlaut. For example, â <- whenever someone posts this mark(?), the � character shows up. As I said, this does not happen on comments but on posts.

    Not complaining but since you guys brought up this topic, just thought I'd pitch in too :eek:
     
  2. adriansonline

    adriansonline New Member

    Anyone else having an issue downloading this from the thread? I keep getting asked to login :(
     
  3. valMETNG

    valMETNG Administrator Staff Member Admin

    Posted by Anonymous vs. correct post_author

    So this is curious...

    I used Selenium to build a script to enter a bunch of test posts while I was signed in as admin. The posts all entered properly, and the post_author properly shows 1 (admin) in the posts table. When I look at bookmarking_list view, this is what I see for each post:

    anonymous.png

    However, when I click on the post to pull up bookmarking_post view, this is what I see for each post:

    not anonymous.png

    Now why would it properly show admin as the author in bookmarking_post, but anonymous in _list view? The relevant code appears to be exactly the same:

    Code:
    <?php echo " " . $h->lang["bookmarking_post_posted_by"] . " "; ?>
    
        <?php 
        if ($user->name)
    		{
               echo "<a href='" . $h->url(array('user' => $user->name)) . "'>" . $user->name . "</a>";
    		}
            else
            {
               echo $h->lang['main_anonymous'];
            }
    ?>
    And I have cleared the cache, so it isn't a cache issue. And I've refreshed the page multiple times, and also tried viewing on different browsers.
     
  4. valMETNG

    valMETNG Administrator Staff Member Admin

    Perhaps it has something to do with line 28 in bookmarking_list.php: $h->readPost(0, $post)?
     
  5. valMETNG

    valMETNG Administrator Staff Member Admin

    When I turn on Firebug, I'm seeing the following message in the console:

    Firebug message.png

    It's referring to line 8 of the javascript file with a message TypeError: e is not a function. Line 8 appears to be Bootstrap.js:

    Code:
    !function(e){"use strict";e(function(){e.support.transition=function(){var e=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},n;for(n in t)if(e.style[n]!==undefined)return t[n]}();return e&&{end:e}}()})}(window.jQuery),!function(e){"use strict";var t='[data-dismiss="alert"]',n=function(n){e(n).on("click",t,this.close)};n.prototype.close=function(t){function s(){i.trigger("closed").remove()}var n=e(this),r=n.attr("data-target"),i;r||(r=n.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,"")),i=e(r),t&&t.preventDefault(),i.length||(i=n.hasClass("alert")?n:n.parent()),i.trigger(t=e.Event("close"));if(t.isDefaultPrevented())return;i.removeClass("in"),e.support.transition&&i.hasClass("fade")?i.on(e.support.transition.end,s):s()};var r=e.fn.alert;e.fn.alert=function(t){return this.each(function(){var r=e(this),i=r.data("alert");i||r.data("alert",i=new n(this)),typeof t=="string"&&i[t].call(r)})},e.fn.alert.Constructor=n,e.fn.alert.noConflict=function(){return e.fn.alert=r,this},e(document).on("click.alert.data-api",t,n.prototype.close)}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.options=e.extend({},e.fn.button.defaults,n)};t.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.data(),i=n.is("input")?"val":"html";e+="Text",r.resetText||n.data("resetText",n[i]()),n[i](r[e]||this.options[e]),setTimeout(function(){e=="loadingText"?n.addClass(t).attr(t,t):n.removeClass(t).removeAttr(t)},0)},t.prototype.toggle=function(){var e=this.$element.closest('[data-toggle="buttons-radio"]');e&&e.find(".active").removeClass("active"),this.$element.toggleClass("active")};var n=e.fn.button;e.fn.button=function(n){return this.each(function(){var r=e(this),i=r.data("button"),s=typeof n=="object"&&n;i||r.data("button",i=new t(this,s)),n=="toggle"?i.toggle():n&&i.setState(n)})},e.fn.button.defaults={loadingText:"loading..."},e.fn.button.Constructor=t,e.fn.button.noConflict=function(){return e.fn.button=n,this},e(document).on("click.button.data-api","[data-toggle^=button]",function(t){var n=e(t.target);n.hasClass("btn")||(n=n.closest(".btn")),n.button("toggle")})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.$element=e(t),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.options.pause=="hover"&&this.$element.on("mouseenter",e.proxy(this.pause,this)).on("mouseleave",e.proxy(this.cycle,this))};t.prototype={cycle:function(t){return t||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(e.proxy(this.next,this),this.options.interval)),this},getActiveIndex:function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$items.index(this.$active)},to:function(t){var n=this.getActiveIndex(),r=this;if(t>this.$items.length-1||t<0)return;return this.sliding?this.$element.one("slid",function(){r.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",e(this.$items[t]))},pause:function(t){return t||(this.paused=!0),this.$element.find(".next, .prev").length&&e.support.transition.end&&(this.$element.trigger(e.support.transition.end),this.cycle(!0)),clearInterval(this.interval),this.interval=null,this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(t,n){var r=this.$element.find(".item.active"),i=n||r[t](),s=this.interval,o=t=="next"?"left":"right",u=t=="next"?"first":"last",a=this,f;this.sliding=!0,s&&this.pause(),i=i.length?i:this.$element.find(".item")[u](),f=e.Event("slide",{relatedTarget:i[0],direction:o});if(i.hasClass("active"))return;this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var t=e(a.$indicators.children()[a.getActiveIndex()]);t&&t.addClass("active")}));if(e.support.transition&&this.$element.hasClass("slide")){this.$element.trigger(f);if(f.isDefaultPrevented())return;i.addClass(t),i[0].offsetWidth,r.addClass(o),i.addClass(o),this.$element.one(e.support.transition.end,function(){i.removeClass([t,o].join(" ")).addClass("active"),r.removeClass(["active",o].join(" ")),a.sliding=!1,setTimeout(function(){a.$element.trigger("slid")},0)})}else{this.$element.trigger(f);if(f.isDefaultPrevented())return;r.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var n=e.fn.carousel;e.fn.carousel=function(n){return this.each(function(){var r=e(this),i=r.data("carousel"),s=e.extend({},e.fn.carousel.defaults,typeof n=="object"&&n),o=typeof n=="string"?n:s.slide;i||r.data("carousel",i=new t(this,s)),typeof n=="number"?i.to(n):o?i[o]():s.interval&&i.pause().cycle()})},e.fn.carousel.defaults={interval:5e3,pause:"hover"},e.fn.carousel.Constructor=t,e.fn....query||this.query.length<this.options.minLength?this.shown?this.hide():this:(n=e.isFunction(this.source)?this.source(this.query,e.proxy(this.process,this)):this.source,n?this.process(n):this)},process:function(t){var n=this;return t=e.grep(t,function(e){return n.matcher(e)}),t=this.sorter(t),t.length?this.render(t.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(e){return~e.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(e){var t=[],n=[],r=[],i;while(i=e.shift())i.toLowerCase().indexOf(this.query.toLowerCase())?~i.indexOf(this.query)?n.push(i):r.push(i):t.push(i);return t.concat(n,r)},highlighter:function(e){var t=this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&");return e.replace(new RegExp("("+t+")","ig"),function(e,t){return"<strong>"+t+"</strong>"})},render:function(t){var n=this;return t=e(t).map(function(t,r){return t=e(n.options.item).attr("data-value",r),t.find("a").html(n.highlighter(r)),t[0]}),t.first().addClass("active"),this.$menu.html(t),this},next:function(t){var n=this.$menu.find(".active").removeClass("active"),r=n.next();r.length||(r=e(this.$menu.find("li")[0])),r.addClass("active")},prev:function(e){var t=this.$menu.find(".active").removeClass("active"),n=t.prev();n.length||(n=this.$menu.find("li").last()),n.addClass("active")},listen:function(){this.$element.on("focus",e.proxy(this.focus,this)).on("blur",e.proxy(this.blur,this)).on("keypress",e.proxy(this.keypress,this)).on("keyup",e.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",e.proxy(this.keydown,this)),this.$menu.on("click",e.proxy(this.click,this)).on("mouseenter","li",e.proxy(this.mouseenter,this)).on("mouseleave","li",e.proxy(this.mouseleave,this))},eventSupported:function(e){var t=e in this.$element;return t||(this.$element.setAttribute(e,"return;"),t=typeof this.$element[e]=="function"),t},move:function(e){if(!this.shown)return;switch(e.keyCode){case 9:case 13:case 27:e.preventDefault();break;case 38:e.preventDefault(),this.prev();break;case 40:e.preventDefault(),this.next()}e.stopPropagation()},keydown:function(t){this.suppressKeyPressRepeat=~e.inArray(t.keyCode,[40,38,9,13,27]),this.move(t)},keypress:function(e){if(this.suppressKeyPressRepeat)return;this.move(e)},keyup:function(e){switch(e.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}e.stopPropagation(),e.preventDefault()},focus:function(e){this.focused=!0},blur:function(e){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(e){e.stopPropagation(),e.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(t){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),e(t.currentTarget).addClass("active")},mouseleave:function(e){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=e.fn.typeahead;e.fn.typeahead=function(n){return this.each(function(){var r=e(this),i=r.data("typeahead"),s=typeof n=="object"&&n;i||r.data("typeahead",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery);
    Should I be concerned?
     
  6. valMETNG

    valMETNG Administrator Staff Member Admin

    I just did a complete reinstall and, other than installing plugins, I haven't done anything else. I am now seeing 2 Firebug messages (the second being ReferenceError: Jquery is not defined):

    Firebug message2.png

    Also, I'm noticing that the dropdown menu problem that I'm seeing is always, and only, occurring in Firefox (and for any user). When I pull up the same build in all other browsers, the dropdown menus work fine. So there's something funky going on here. Might the two problems be related?

    According to this page, jQuery must be included before bootstrap. Might that be the issue?
     
  7. Sv9t

    Sv9t Active Member

    valMETNG, use the best browser Chrome, as in Mozilla Firefox has some problems with loading JS. I wrote here Download-Hotaru-CMS-1-5-1
     
  8. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    This is part of the code that loads the header

    Code:
                            // bringing this up-top with css because some inline js on plugins needs to have jquery loaded first to work
                            // only load jquery if we havent already loaded it
                            if (!isset($h->vars['framework']['jquery'])) {
                                echo '<script async type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>';             
                                $h->vars['framework']['jquery'] = true;                            
                            }
    
    You can see I even commented the section to say why I am loading it in the header rather than the footer.
    Once thing to note is I am loading this with the "async" tag which means other scripts can load while this loads in the background. We could take that out and force it to load first before anything else could load. Maybe Firefox has a problem with that
     
    valMETNG likes this.
  9. valMETNG

    valMETNG Administrator Staff Member Admin

    You figured it out! When I remove the async tag from line 1185 in Hotaru.php, Firefox works properly. Put it back and hit refresh? Problem is back. It wasn't clear if I also needed to remove it from lines 1190 and 1206. But, generally speaking, it would seem this change has to be made - otherwise, any user that uses Firefox is going to have problems.

    - - - Updated - - -

    Thanks for the advice. I typically use all different browsers to test, as they can uncover different problems. That's one of the biggest problems with coding in my opinion, and we have to be able to properly support (most) all browsers that the majority of users will use.
     
  10. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    ok, I will remove the async for next version
     
  11. narc

    narc Well-Known Member

    I also had to remove async. I had the same problem. tested in opera, chrome, firefox and ie10.
     
    shibuya246 likes this.
  12. angolanmade

    angolanmade Well-Known Member

    Not sure if this is a bug, but I noticed that when I changed the admin theme settings to use a custom admin theme it seems to then not allow me to change regular themes by click the big green "active this theme" button.

    To to accomplish this do the following:

    1. Copy admin theme and rename it to something like admin_mycustom
    2. Go to admin settings and change admin theme settings to match the above name e.i. - admin_mycustom
    3. Now try to activate/change themes in the admin control panel (Left side panel)
    4. You can try to toggle between classic and default themes
     

    Attached Files:

  13. Sv9t

    Sv9t Active Member

    In bookmarking plugin found a bug, a screenshot:
    Bookmarking 1.jpg
    Bookmarking4.jpg
    I added a line in the file bookmarking_language.php
    Code:
    / * Settings * /
    $lang["bookmarking_settings_sort_bar_dropdown"]
    but the error is on line 96 remained.
     
  14. nothingman

    nothingman Active Member

    Sv9t, I think you are running the older version. The bookmarking_language.php on my version has the said lines.

    Code:
    $lang["bookmarking_settings_sort_bar_dropdown"] = "Use dropdown for selecting filtered posts";
    The overview tab on the bookmarking settings page shows:
    Latest Version : 0.5
    Your Version : 0.6

    Perhaps you could try out version 0.6?
     
    Last edited: Jun 28, 2013
    Sv9t likes this.
  15. Sv9t

    Sv9t Active Member

    thanks, bookmarking_language.php file was taken from the version bookmarking: 0.5. Replaced by a new file, the error disappeared.
     
    shibuya246 likes this.
  16. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    This will be due to the javascript. check in the bottom right hand corner of browser if you are using Chrome and see if you have a red javascript error?
     
  17. valMETNG

    valMETNG Administrator Staff Member Admin

    Category names must be unique

    I'm curious about some things: why is category_name a unique key in the categories table? Also, why is it disallowed to have the same category name under multiple parent categories? For example, I could see two categories at the root called "science" and "education," but then have another category "science" under education (along with "math," "language," etc.). Right now, you can't do that.

    Besides the obvious of modifying base being a no-no, is there any downside to removing that unique key (and also changing the associated processing in /libs/categories.php to include category_parent when checking for duplicates)?
     
  18. angolanmade

    angolanmade Well-Known Member

    Wondered the same. I have always wanted this ability with hotaru.
     
  19. valMETNG

    valMETNG Administrator Staff Member Admin

    Having put this through the paces a bit more, I'm noticing quite a few "CSRF error. Please try again." I'm assuming these are coming because my session is timing out as I troubleshoot something and then come back later trying to continue. I'm wondering how often you all and your users see these types of messages. Putting aside changing the message to something that a non-technical person can understand (e.g., "For security, we've automatically timed-out your session. Please start over."), has anyone seen these often enough to warrant changing the csrf class as described here? I know I'm seeing them more often than within a 60-minute window.
     
  20. valMETNG

    valMETNG Administrator Staff Member Admin

    As a follow-up to this, I just tested registering with the same username a few minutes after the last attempt. Got a CSRF error. That use case doesn't seem like it should generate one.
     

Share This Page