Forum Replies Created

Viewing 7 replies - 61 through 67 (of 67 total)
  • Thread Starter chrishe

    (@chrishe)

    @cpres Hi, thanks for that! Not 100% sure but I think same issue occurs in gallery.php as well as slide.php (function Validate() looks v similar!
    Cheers

    Thread Starter chrishe

    (@chrishe)

    @ctheory Hi, No, I don’t know.
    What version of wordpress are you using?
    I would try the basic troubleshooting methods:
    1. Disable all other plugins
    2.Switch theme to 2011/2012
    Does it still happen?

    Thread Starter chrishe

    (@chrishe)

    P.S.
    I meanwhile attempted to work out the code and applied a “patch”, hence the snapshot shows a later line number.
    I really don’t want to hack core files, but leave it to you who understands what they are doing.
    I am pretty sure the issue is that when the form is submitted it’s seeing an array, not a string, and this caused the validate function to trip over.
    if it helps at all, my work-patch is here:

    function validate($data = null) {
    		$this -> errors = array();
    
    		if (!empty($data)) {
    			$data = (empty($data[$this -> model])) ? $data : $data[$this -> model];
    			foreach ($data as $dkey => $dval) {
    	// addition: if a form is posted, $data is array[2]
    				if ( is_array($dval) ) {
    					foreach ($dval as $akey => $aval) {
    						$akey = stripslashes($aval);
    					}
    					extract($dval, EXTR_SKIP);
    				}else
    	// end addition
    
    				$this -> data -> {$dkey} = stripslashes($dval);
    			}

    Thread Starter chrishe

    (@chrishe)

    Thanks for coming back to me – I like the slide display, so would hope to use it on our club site
    Still same issue – original slide title was imported as dsc0002.jpg, I tried to change the title to “Southport 24Hr race” (without quotes of course!)
    I have put a snapshot of the admin page on my own website and give you a link https://cp-software.co.uk/budworth/satellite_slide_title_error.png

    If you need more info, let me know…
    Thanks
    Chris

    Thread Starter chrishe

    (@chrishe)

    With thanks to Dave at wickman studios below, here is a slightly revised patch, to make compatible with earlier versions and reduce the size of the URL input box – see lines around 367 onwards in sponsors-carousel.php
    `
    <?php _e(“New (select *full size* before insert): “, ‘sponsors-carousel’); ?>
    <!– <input type=”text” name=”scwp_link_image” id=”scwp_link_image” size=”50″ value=”” style=”width: 80%” /> –>
    <!– if input box is too wide, change width to max-width as in the next line, and comment out the original line, as shown here –>
    <input type=”text” name=”scwp_link_image” id=”scwp_link_image” size=”50″ value=”” style=”max-width: 80%” />

    <?php
    if (get_bloginfo ( ‘version’ )>=”3.5″)
    echo media_buttons(__(‘Add an Image’), ‘images/media-button-image.gif?ver=20100531’, ‘image’,$scwp_plugin_name); // for v3.5
    else{ //for earlier WP versions
    if (get_bloginfo ( ‘version’ )<“3.3”)
    echo _media_button(__(‘Add an Image’), ‘images/media-button-image.gif?ver=20100531’, ‘image’);
    else
    echo _media_button(__(‘Add an Image’), ‘images/media-button-image.gif?ver=20100531’, ‘image’,$scwp_plugin_name);
    }
    ?>
    </div>

    Yes it can be done, I didn’t find a plugin either!

    Look at Role Manager plugin, set option Read Private Posts for your registered members. I have customised my site quite a lot, but I think that does what you want.
    Chris

    A related thought/question..
    in $wpdb the wp_posts.post_category is only used for posts at present (and in version 2.1???) – could it also be used for page category?
    Reason – I am writing a website for a sailing club. This needs many static pages (viewable by any visitor) plus a members’ area with news/comments/club event lists etc. I want _some_ static pages only visible for members (login). A solution would be to create categories for the static pages (e.g. public, members), and then give a menu of pages based on status of logged-in/not logged in.
    Has this already been done? Is there any change in 2.1 that would render this idea incompatible?
    Thanks
    Chris

Viewing 7 replies - 61 through 67 (of 67 total)