Forum Replies Created

Viewing 15 replies - 46 through 60 (of 103 total)
  • Not sure which plugins you are referring to Salromano. View Own Posts Media Only might be one you want to check out that sounds like it does the 2nd half of what you’re looking for.

    The first block sample – yes theme functions would work. Or in a functionality plugin to keep the change if you swap themes.

    The second block sample (just the JS script) could go in any template within your theme. That was how I have used it – as it is on a front-end form that I wanted to change the default only.

    Your welcome.

    For anyone else who’s not afraid of digging around in the core files of WP to understand / discover such things….This video with Koop was invaluable for getting a good overview of the structure of the new media library and how it is built with underscore and backbone, particularly the second half.

    The two main files where most of the relevant code are located in:

    • /wp-includes/js/media-views.js
    • /wp-includes/js/media-models.js

    Along with Firebug in command line mode to inspect / test set the value of objects / variables that you find via the code.

    SOLVED!!!!!!

    If you want to have the editor default to the Upload Files tab in the admin editor:

    <?php
    add_action( 'admin_footer-post-new.php', 'idealien_mediaDefault_script' );
    add_action( 'admin_footer-post.php', 'idealien_mediaDefault_script' );
    
    function idealien_mediaDefault_script()
    {
        ?>
    <script type="text/javascript">
    jQuery(document).ready(function($){
    wp.media.controller.Library.prototype.defaults.contentUserSetting=false;
    });
    </script>
    <?php } ?>

    If you just want that to happen on a front-end page – use this in a template or a JS file called from the appropriate template / page.

    <script type="text/javascript">
    jQuery(document).ready(function($){
    wp.media.controller.Library.prototype.defaults.contentUserSetting=false;
    });
    </script>

    Thanks lunaticalm – Unfortunately working in 3.5 and using the new media uploader of 3.5 are two very different things and I’m trying to figure out a solution for the latter case.

    Once it’s updated for WP 3.5 that would be a very good reference yes. It still lists compatability as 3.4.2 and last update prior to 3.5 release or betas.

    What do you do if the user has uploaded multiple images?
    Is there a way to have the Set Featured Image link on the list of options within the media uploader turned on?

    Plugin Author Jamie O

    (@idealien)

    Yes – The code that is specific to Gravity Forms only gets executed based on hooks / filters which would not exist if you do not have GF installed.

    The plugin does a couple of important things based on GF which you would have to replicate with whatever other form / plugin you would use:

    • Pre-populate the drop-downs based on the taxonomy entries of the custom post type
    • Validate entries upon submission prior to creating the rideshare
    • Transfer results from form to the custom post type upon successful validation

    Love the plugin concept!

    Would be fantastic if it could support uploading .mp3s or other large(r) media files. I attempted to do so myself:

    • The actual modifications within the plugin to have it display .mp3 from dropbox aren’t so bad. Search for gif or png and add / edit the file type lists in a few spots.
    • The dropbox tab will show .mp3 and attempt to upload them, but then provide a “Error when sideloading. Sorry, this file type is not permitted for security reasons.” which is coming from call to is_wp_error that is a core function
    • Reading up a bit more, limit comes from what mime types can be uploaded with default configuration of WP.
    • Tried changing options in settings panel for mime types, a few plugins which offer more configuration / types, but none seem to enable this successfully.

    Not sure what the resolution to this is – but it would be a great feature to have.

    Plugin Author Jamie O

    (@idealien)

    Hi teleanu!

    It has been a while since I have looked at the code for the plugin – and the in-progress updates I have done for v0.2 of it. If you’re not afraid of trying to tweak the code for a short-term fix, this will help you.

    Around line 624 you should see this:

    //Retrieve all rideshares by event
    	$queryParameters = array(
    	'post_type' => 'idealien_rideshare',
    	'posts_per_page' => '-1',
    	'orderby' => 'meta_value',
    	'meta_key' => 'idealien_rideshare_event'
    );

    At the time of the current version release the meta_query parameters were not as robust as they are now.

    I haven’t tested the following, but replacing that with the following code or something close to it should allow you to filter via the meta_query parameter for entries with the custom field idealien_rideshare_departureDate of more recent than today.

    $dateCompare = '>=';
    $dateValue = date("m/d/Y", time());
    $dateMetaQuery = array(
    	'key' => 'idealien_rideshare_departureDate',
    	'value' => $dateValue,
    	'compare' => $dateCompare
    );
    
    if ( $dateMetaQuery ) { $meta_query[] = $dateMetaQuery; }
    
    $queryParameters = array(
    	'post_type' => 'idealien_rideshare',
    	'posts_per_page' => '-1',
    	'meta_query' => $meta_query,
        	'orderby' => 'meta_value',
    	'meta_key' => 'idealien_rideshare_event',
    	'order' => 'ASC'
    );

    Also – for sorting results you could consider something like jQuery TableSorter that the markup for the results table should allow you to work with. I wish I had more time to be able to work on the plugin and more WordPress stuff at the moment.

    Post back if you have success or what results you get and I might be able to steer you in the right direction based on it.

    Plugin Author Jamie O

    (@idealien)

    Glad you’re enjoying it teleanu. Answers for your challenges:

    I added 2 rides, but i don’t see the line that separate the 2, nor your screens style.

    You can add styles via CSS to your theme that will override the defaults of the plugin. Something like this will get you the borders you seek.

    #rideshare td {
        border: 1px solid black;
    }

    Another thing. When i’m in admin & go to Rideshare Type, Event & City, in the Events & Cities & Types i see 0 value under the Rideshare option.

    These are left blank by default – you can populate the city and event types to suit your website / needs. This is one of a few ways that is required for setup for the plugin beyond just activating it.

    I haven’t testet yet. but how many rides are needed until the plugin will make page 2, 3, etc … ? I do not want to have a very long page.

    It does not currently have paginated results. I will think about that for a future version of the plugin though. Thanks!

    And if the rides do not disappear after the period, i recomand to do so ??

    It won’t show ride shares that are in the past, but there is nothing in the plugin which will delete entries.

    Was ok if we had From City to City… Because is nice to know from where you fly off ??

    The initial use case of the plugin was event-based. I have a newer version that changes up the option to let you specify a submission form is city or event based for destination. It’s not yet ready for public consumption yet, but soon though I hope.

    Thanks for the feedback!

    I am running into similar issues to @michael and tested the development version to no avail. If I run the following command via ldapsearch on the command line of the server I get a successful result (genericized of course):

    ldapsearch -H ldap://domaincontrollerurl -b 'dc=domain,dc=tld' -D 'DOMAIN\Username' -x -w 'password' '(sAMAccountName=username)'

    Could you possibly help with any of the following:

    1. A way to see what the syntax of the calls to LDAP / AD are when attempting to login (to help with trial / error debugging of changing settings)
    2. If I specify the DOMAIN\username in bind username and save parameters the \ is stripped out. Any way around that?
    3. How to flag -x via settings in the dashboard and/or where I might add that in code as a short-term fix until next development version?

    Thanks for making such a great plugin – or what appears to be as I can’t yet get it to fully operational to confirm that is the case ;{

    Thread Starter Jamie O

    (@idealien)

    For anyone else encountering this issue, a quick fix to modify the plugin can resolve it has been tested with v1.1 of the plugin.

    In /wp-content/plugins/more-types/more-types-settings.php on line 340.

    //Comment out the line which generates the true / false boolean option
    //$row = array(__('Has archive', 'more-plugins'), $more_types_settings->settings_bool('has_archive') . $comment);
    //Replace it with one that uses the settings_input instead of settings_bool to generate a text field
    $row = array(__('Has archive', 'more-plugins'), $more_types_settings->settings_input('has_archive') . $comment);

    You will have to put 0 / 1 in if you want to maintain the false (0) / true (1) values for any subsequent modifications.

    Plugin Author Jamie O

    (@idealien)

    Do you have the required Gravity Forms Custom Post Type add-on plugin? That is what drives the logic of having form submissions sent to the custom post type (idealien_rideshare).

    It might also be the case that if you didn’t have that plugin activated when importing the form .xml that it would setup with the default reverting to post type. Try deleting / re-creating the form with that plugin activated and let me know how you make out.

    Yes b/c I had a custom meta box on the post type editor window which stores all the data in custom fields, only some of which were taxonomy. If I remember the issue I was working towards when I posted that, it had something to do with The Events Calendar as well.

Viewing 15 replies - 46 through 60 (of 103 total)