Welcome to the archive of the old FlatPress support forum. Browse more than a decade of FlatPress wisdom! Login is disabled.

The current FlatPress support forum is available here: forum.flatpress.org
Raw widget management gone in 1.0.2?
  • I noticed that the raw widget manager was gone ofter the update to 1.0.2. Is this intentional? I had to upload the widget admin files from 1.0.0 in order to gain access to the raw manager again. Just letting.you know. Thanks. :)
  • it was intentional. You can enable it manually by editing these lines:
    just remove the '//'
  • Nice, I just made the change and now have access to the raw widget manager once more. Now, my second question:

    Is it normal that I'm still unable to manage widgets using the drag and drop interface? When I drag and drop, all it does is select stuff across the page instead of actually drag and dropping. 
  • You need to make sure that javascript is enabled in your browser and that the correct JQuery and JQueryUI are enabled.  The new drag and drop code won't work with the old versions.  Make sure your fp-plugins/jquery/plugin.jquery.php has the following lines and comment out the old lines like so.  When I was doing the work on the plugin it was easier to use Google's CDN instead of a local file.

    <!--<script type="text/javascript" src="{$pdir}res/jquery-1.7.1.min.js"></script>-->

    <!--<script type="text/javascript" src="{$pdir}res/jquery-ui-1.8.11.custom.min.js"></script>-->

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
  • I made the change you mentionned in the plugin.jquery.php file, but I didn't see any change in the way the widget interface behaves. 

    I'm using the latest version of Google Chrome. 
  • Are you using the git version?  Is the jquery plugin enabled?  Do you have any script blocking going on?  The git version is feature stable for what it's worth.  I've actually also had the jquery plugin turned off on accident once and had the same issue with dragging and dropping not working right.
  • I'm using the git version of the plugin. And I updated the admin.widgets.js file with the git code as well. 
    jquery is enabled. 
    I disabled my ad blocker. 
    As I'm using Chrome, I tested it with IE. 

    I can't seem to be able to find what's wrong here. 
  • The only two things required to make the drag/drop function work correctly are the admin.widgets.js and the updated urls or the correct version of the jquery and jqueryui files to replace the old versions and the correct pointers to those versions.  I'm not sure what could be causing this but I'm sure it's probably something simple.  I've not tested in ie because I don't use windows but I have tested in chrome, firefox and opera and things work correctly for me in each.  The jquery plugin is required to be enabled.  Noscript will prevent calls to the google cdn server.  The lines in plugin.jquery.php have to point to the correct versions and nothing else, exactly as above.  I'm not sure if preceding versions will work or not but they should to a point.  I do know that 1.7.1 won't.  Try enabling all of the plugins and see what happens.  This is just a base install right, nothing extra?
  • What theme are you using?  Leggero?  Try grabbing the updated css files for that off of the git server as well if you are.  There is some styling in those that makes things work better.  If I remember right, there were only four files for that particular update that makes styling the admin widgets possible.  The plugin.jquery.php, the admin.widgets.js, the two admin.css files in leggero and flatmaas-rev styles.  The more I think about this, the more I think something isn't configured right on your end.  How is your local server configured?  The only time I had this problem was when I was messing with the php end of themeing and the code for my themes flyouts wasn't getting pushed to the front end.
  • Hi Marc, I made NoWhereMan removing Rawwidget feature, as it was a possible exploit to inject PHP code on your site.
    If you want it back you just have to enable it again ;-)

    Have you disabled the old plugin jsutils?
    Please open a JS console (F12 in Firefox and Chrome) and digit $ .
    What is the output?

    @liquibyte: I was thinking that we could use something like yepnope to load CDN version of scripts and if they fails load your own hosted version... Something like yepnope.js...
  • I just used the google CDN url to avoid having 6 versions of the same thing on my localhost.  NoWhereMan can, at his discretion, update the local copies to a newer version that would work.  I know that 1.7.1 breaks things but I do believe that 1.9.x or later should work as well.

    I've never heard of yepnope and I don't quite understand what it's supposed to be doing and why it could be beneficial.  The user can turn off all javascript capable features if that is what is desired though it makes managing widgets a tad harder and more involved.  I had the thought of doing a graceful fallback of the widgets panel to something that was a bit more intuitive than the raw interface and yet secure, perhaps dynamic checkboxes based on what's installed.

    I've been avoiding the work lately due to an electronics project I'm working on so it may take me a while to get it done.  My main interest was getting rid of all of the strict errors and warnings first because they bug me and getting the ouput of HTML5 right so that it can be styled in a meaningful fashion (i.e. making sure that all forms have useful classes).  I've actually managed to do this in the 060219 version due to having to update the code to run on a newer version of php.  I went back to the earliest version I could find so I could work with the flattest codebase available for study.  I'm neither a javascript or a php coder, I'm an more of an embedded developer that likes C and assembler so I'm learning on the fly.  I also don't test for IE, ever.
  • yepnope can help loading things, it is a loader.
    You make it loading jQuery from the CDN instead of a local copy, but if the CDN fails, then use the local copy.

    I've been thinking to something like the old raw widgets, but I think that textareas with a widget per line would work very well :-)
    Maybe two panels, one on the left with a textarea for each widgets placeholder, and one on the right, with all widgets with their id and description.
  • I don't know, I just don't see the usefulness of that in relation to adding another layer of complexity just to make sure that Google is up.  I'd say that always using a local copy would be the better way to go but I didn't want to make the decision to update the version(s) on my own preferring to leave that to the owner.

    The raw way was ok except for the fact that the php file was being edited directly instead of templated in.  One of the reasons for my port to HTML5 was the drag and drop functionality that's coming into play lately.  I'd like to do a pure HTML5/CSS3 version that has a modern featureset like that which is why I went back in time to the beginning of Flatpress.  I've actually stripped out all of the plugins and am working with the base code to get editing of templates directly as a feature.  I know there is a javascript way of doing this but I thought that getting this working without it could also be used as a fallback.  I'm not even sure if it would even be possible or not yet but I'll be trying.
  • I'm able to drag and drop in a fresh Flatpress install. The issue is somewhere in my current setup. I'll let you know if I get to get through it myself. 
  • Hi, please check if you have mootools (jsutils) enabled, as I wrote before.
  • That's it. I disabled jsutils and it's working now. I'm able to drag and drop widgets. As soon as I enable it, it's gone. 

    Thanks a bunch! I'm going to disable the raw editor now. :)
Start a New Discussion

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion