csimpson
Forum Replies Created
-
Forum: Hacks
In reply to: Help using PHP Request for posting Form to Iframeah ive read around and seeing info that it is detailing this when date is null or not parsed through correctly. still checking
Forum: Hacks
In reply to: Help using PHP Request for posting Form to Iframeyeah kind of get it! although the date coming through now on the source code of the iframe is 01/01/1970! haha.
<?php $arrivaldate = date('d/m/Y', strtotime($_REQUEST['arrival'])); //similar for departure //my echo example here with curly braces inserted goes here ?> <?php $departuredate = date('d/m/Y', strtotime($_REQUEST['departure'])); //similar for departure //my echo example here with curly braces inserted goes here ?> <?php echo "<iframe name=\"iframeTarget\" id=\"iframeTarget\" src=\"https://uk2.roomlynx.net/rezrooms2/loadOBMApplication.action?siteId=KAYSCLAY&request_locale=en&chainAction=newAvailabilitySearch&arrival={$arrivaldate}&departure={$departuredate}&numberOfPersons={$_REQUEST['numberOfPersons']}&numberOfChildren={$_REQUEST['numberOfChildren']}\" frameborder=\"0\" allowTransparency=\"true\" seamless></iframe>"; ?>
OUTCOME from SOURCECODE
<iframe name="iframeTarget" id="iframeTarget" src="https://uk2.roomlynx.net/rezrooms2/loadOBMApplication.action?siteId=KAYSCLAY&request_locale=en&chainAction=newAvailabilitySearch&arrival=01/01/1970&departure=01/01/1970&numberOfPersons=3&numberOfChildren=4" frameborder="0" allowTransparency="true" seamless></iframe>
Forum: Hacks
In reply to: Help using PHP Request for posting Form to Iframetried this with no success:
{$_REQUEST = arrival('d/m/Y', strtotime['arrival']}
Forum: Hacks
In reply to: Help using PHP Request for posting Form to Iframeone small issue going on now! This works in most browsers apart from safari! its changing the date format. As you said i need to format the date format backend in php to ensure the correct format is always used.
ive looked everywhere and seen so many examples but getting no where whilst changing date formats in outputted string.
any ideas? I need the dates to be dd/mm/yyyy.
<?php echo "<iframe name=\"iframeTarget\" id=\"iframeTarget\" src=\"https://uk2.roomlynx.net/rezrooms2/loadOBMApplication.action?siteId=KAYSCLAY&request_locale=en&chainAction=newAvailabilitySearch&arrival={$_REQUEST['arrival']}&departure={$_REQUEST['departure']}&numberOfPersons={$_REQUEST['numberOfPersons']}&numberOfChildren={$_REQUEST['numberOfChildren']}\" frameborder=\"0\" allowTransparency=\"true\" seamless></iframe>"; ?>
Forum: Hacks
In reply to: Help using PHP Request for posting Form to Iframebcworkz – I cant thank you enough, its working! I’ve used jquery datepicker on front end to valid date the date that is coming though. Only issue is, as you mentioned, when java is turned off. I’ll look into that. Many thanks for your help.
Forum: Hacks
In reply to: Help using PHP Request for posting Form to IframeHi bcworkz, thank you very much for your response. so far, i am just receiving a blank screen on the expected iframe page now.
For my text editor, I use textpad, which does highlight the variables.
Using your last entry above, replacing iBrame with iframe, and replacing the external url part, it shows the blank page (must be an error somewhere) – also stops showing variables after the first in text editor.
So, i made all variables use the request function and had to replace & with & in between each for the variables to stand out. My last code is below but unfortunately, still shows white screen!
<?php echo "<iframe name=\"testframe\" src=\"https://uk2.roomlynx.net/rezrooms2/loadOBMApplication.action?siteId=KAYSCLAY&request_locale=en&chainAction=newAvailabilitySearch&arrival=$_REQUEST['arrival']&departure=$_REQUEST['departure']&numberOfPersons=$_REQUEST['numberOfPersons']&numberOfChildren=$_REQUEST['numberOfChildren']\"></iframe>"; ?>
I have yet to do any validation on the front end, but was at least previously seeing some page. Although did make input field type date and using latest firefox right now.
Any thoughts?
Forum: Plugins
In reply to: Need to pass values to another page showing iframeCould do with some help please?
I’m making progress. here is form:
<form target="iframeTarget" action="/book-online/" class="FormGuestline" id="FormGuestline" method="GET"> <input name="request_locale" type="hidden" value="en" /> <input name="siteId" type="hidden" value="KAYSGATE" /> <input name="pagename" type="hidden" value="Book-Now" /> <input name="chainAction" type="hidden" value="newAvailabilitySearch" /> <div class="FormField Arrival"> <label for="arrival">Arrival Date</label> <input id="arrival" name="arrival" type="text" /></div> <div class="FormField Departure"> <label for="departure">Departure Date</label> <input id="departure" name="departure" type="text" /></div> <div class="FormField NumberOfPersons"> <label for="numberOfPersons">Adults</label> <select id="numberOfPersons" name="numberOfPersons"><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select></div> <div class="FormField NumberOfChildren"> <label for="numberOfChildren">Children</label> <select id="numberOfChildren" name="numberOfChildren"><option value="0">0</option><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option></select></div> <div class="FormField Submit"> <input type="submit" value="Book now" /></div> </form>
here is iframe
<iframe name="iframeTarget" id="iframeTarget" src="https://externalwebsite.action" width="1200px" height="1235px" frameborder="0" scrolling="no" allowTransparency="true" seamless></iframe>
outcome is this:
https://www.mywebsite/book-online/?request_locale=en&siteId=KAYSGATE&pagename=Book-Now-Connaught-Hotel-Bournemouth&chainAction=newAvailabilitySearch&arrival=28%2F11%2F2013&departure=29%2F11%2F2013&numberOfPersons=2&numberOfChildren=2
so almost there, the resulting page receiving the parameters is displaying the passed parameters in the url, but it is not affecting the iframe.
Forum: Themes and Templates
In reply to: Simply using an excerpt on a category pageaffraid i dont, ive been reading about using the loop-category.php file as well, but this template doesnt have it either. i think the get_template_part is just refering to the main loop file but then i cannot see any reference in that script which particularly is being used for the category pages.
For the love of god.. i copy the whole loop file!
<?php /* If there are no posts to display, such as an empty archive page */ ?> <?php if ( ! have_posts() ) : ?> <div id="post-0" class="post error404 not-found"> <h1 class="entry-title"> <?php _e( 'Not Found', 'twentyten' ); ?> </h1> </div> <!-- #post-0 --> <?php endif; ?> <?php /* Start the Loop. * * In Twenty Ten we use the same loop in multiple contexts. * It is broken into three main parts: when we're displaying * posts that are in the gallery category, when we're displaying * posts in the asides category, and finally all other posts. * * Additionally, we sometimes check for whether we are on an * archive page, a search page, etc., allowing for small differences * in the loop on each template without actually duplicating * the rest of the loop that is shared. * * Without further ado, the loop: */ ?> <?php while ( have_posts() ) : the_post(); ?> <?php /* How to display posts in the Gallery category. */ ?> <?php if ( in_category( _x('gallery', 'gallery category slug', 'twentyten') ) ) : ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"> <?php the_title(); ?> </a></h2> <div class="entry-meta"> <?php twentyten_posted_on(); ?> </div> <!-- .entry-meta --> <div class="entry-content"> <?php if ( post_password_required() ) : ?> <?php the_content(); ?> <?php else : ?> <?php $images = get_children( array( 'post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) ); if ( $images ) : $total_images = count( $images ); $image = array_shift( $images ); $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' ); ?> <div class="gallery-thumb"> <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a> </div> <!-- .gallery-thumb --> <p><em><?php printf( __( 'This gallery contains <a %1$s>%2$s photos</a>.', 'twentyten' ), 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ) . '" rel="bookmark"', $total_images ); ?></em></p> <?php endif; ?> <?php the_excerpt(); ?> <?php endif; ?> </div> <!-- .entry-content --> <div class="entry-utility"> <a href="<?php echo get_term_link( _x('gallery', 'gallery category slug', 'twentyten'), 'category' ); ?>" title="<?php esc_attr_e( 'View posts in the Gallery category', 'twentyten' ); ?>"> <?php _e( 'More Galleries', 'twentyten' ); ?> </a> <span class="meta-sep">|</span> <span class="comments-link"> <?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?> </span> <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> </div> <!-- .entry-utility --> </div> <!-- #post-## --> <?php /* How to display posts in the asides category */ ?> <?php elseif ( in_category( _x('asides', 'asides category slug', 'twentyten') ) ) : ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if (is_search() ) : // Display excerpts for archives and search. ?> <div class="entry-summary"> <?php the_excerpt(); ?> </div> <!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> </div> <!-- .entry-content --> <?php endif; ?> <div class="entry-utility"> <?php twentyten_posted_on(); ?> <span class="meta-sep">|</span> <span class="comments-link"> <?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?> </span> <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> </div> <!-- .entry-utility --> </div> <!-- #post-## --> <?php /* How to display all other posts. */ ?> <?php else : ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if(has_post_thumbnail()) { ?> <div class="entry-meta"> <?php the_time('l M, Y'); ?> <?php the_time('g:i A'); ?> | by <?php the_author_posts_link(); ?> | <span class="comments-link"> <?php comments_popup_link( __( 'NO COMMENTS', 'twentyten' ), __( '1 COMMENT', 'twentyten' ), __( '% COMMENTS', 'twentyten' ) ); ?> </span> </div> <!-- .entry-meta --> <div class="post_left"><?php $thsrc = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'thumbnail', false, '' ); $fullsrc = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full', false, '' ); echo ('<a href="'.$fullsrc[0].'"><img src="'.$thsrc[0].'"/></a>'); ?></div> <div class="post_right"> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"> <?php the_title(); ?> </a></h2> <?php if (is_search() ) : // Only display excerpts for archives and search. ?> <div class="entry-summary"> <div class="style"> <?php the_excerpt(); ?> </div> </div> <!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <div class="style"> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> </div> </div> <!-- .entry-content --> <?php endif; ?> <?php /* <div class="entry-utility"> <?php if ( count( get_the_category() ) ) : ?> <span class="cat-links"> <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> </span> <span class="meta-sep">|</span> <?php endif; ?> <?php $tags_list = get_the_tag_list( '', ', ' ); if ( $tags_list ): ?> <span class="tag-links"> <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> </span> <span class="meta-sep">|</span> <?php endif; ?> <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> </div><!-- .entry-utility --> */ ?> </div> <div class="clear"></div> <?php } else { ?> <div class="entry-meta"> <?php the_time('l M, Y'); ?> <?php the_time('g:i A'); ?> | by <?php the_author_posts_link(); ?> | <span class="comments-link"> <?php comments_popup_link( __( 'NO COMMENTS', 'twentyten' ), __( '1 COMMENT', 'twentyten' ), __( '% COMMENTS', 'twentyten' ) ); ?> </span> </div> <!-- .entry-meta --> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"> <?php the_title(); ?> </a></h2> <?php if (is_search() ) : // Only display excerpts for archives and search. ?> <div class="entry-summary"> <div class="style"> <?php the_excerpt(); ?> </div> </div> <!-- .entry-summary --> <?php else : ?> <div class="entry-content"> <div class="style"> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> </div> </div> <!-- .entry-content --> <?php endif; ?> <?php /* <div class="entry-utility"> <?php if ( count( get_the_category() ) ) : ?> <span class="cat-links"> <?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?> </span> <span class="meta-sep">|</span> <?php endif; ?> <?php $tags_list = get_the_tag_list( '', ', ' ); if ( $tags_list ): ?> <span class="tag-links"> <?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?> </span> <span class="meta-sep">|</span> <?php endif; ?> <span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span> <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?> </div><!-- .entry-utility --> */ ?> <?php } ?> </div> <!-- #post-## --> <?php comments_template( '', true ); ?> <?php endif; // This was the if statement that broke the loop into three parts based on categories. ?> <?php endwhile; // End the loop. Whew. ?> <?php /* Display navigation to next/previous pages when applicable */ ?> <?php if ( $wp_query->max_num_pages > 1 ) : ?> <div id="nav-below" class="navigation"> <div class="nav-previous"> <?php next_posts_link( __( '<span class="meta-nav">«</span> OLDER', 'twentyten' ) ); ?> </div> <div class="nav-next"> <?php previous_posts_link( __( 'NEWER <span class="meta-nav">»</span>', 'twentyten' ) ); ?> </div> <div class="clear"></div> </div> <!-- #nav-below --> <?php endif; ?>
Forum: Themes and Templates
In reply to: Simply using an excerpt on a category pageHere is a url too – top post showing as excerpt as was using MORE feature only… https://www.fitnessteamipswich.co.uk/category/workouts/studio-cycling/
just run cron with aid of Core Control, and I do now see the debug file.
however:
2012-09-07 17:59:56 : Cron Running
2012-09-07 17:59:56 : Access token is AAADV3yPklSUBALtjgq8yJZBTfE4wbcv7ZB0TRb91ZA6xlhhhnR4Ak0AShXpw86ZAY3zbjGzwZCvjZBItaGYfeXYz6oZAsCGJZBdqRfHJECZCTMwZDZD
2012-09-07 17:59:56 : response is Array
2012-09-07 17:59:56 : error type is
2012-09-07 17:59:56 : error message is
2012-09-07 17:59:56 : Getting posts, SQL was Select ID FROM wp_posts WHERE post_date BETWEEN ‘2012-09-05 17:59:56’ AND ‘2012-09-07 17:59:56’
2012-09-07 17:59:56 : No posts to examine
2012-09-07 18:02:38 : Cron Running
2012-09-07 18:02:38 : Access token is AAADV3yPklSUBALtjgq8yJZBTfE4wbcv7ZB0TRb91ZA6xlhhhnR4Ak0AShXpw86ZAY3zbjGzwZCvjZBItaGYfeXYz6oZAsCGJZBdqRfHJECZCTMwZDZD
2012-09-07 18:02:39 : response is Array
2012-09-07 18:02:39 : error type is
2012-09-07 18:02:39 : error message is
2012-09-07 18:02:39 : Getting posts, SQL was Select ID FROM wp_posts WHERE post_date BETWEEN ‘2012-09-05 18:02:39’ AND ‘2012-09-07 18:02:39’
2012-09-07 18:02:39 : No posts to examineafter posting, and making a comment on post, no comments are coming in. This did work but has stopped.
regards Craig
thanks john, just installed core control as there is no wpbook_debug.txt file anywhere in plugin folder(s). Ill keep posted, thanks
Hi all, my issue is all resolved. I was using the wrong PageID. Plus the blank white page issue i resolved by going into the app settings and making “Remove offline_access permission:” set to enabled. Enabled is default but some other advice elsewhere told me to change it too disabled which isnt right.
Thanks John for help, app is awesome.
i am trying to post to https://www.facebook.com/hintleshamfisheries which from your link above, seems like you have the right page ID. I used 155716824446169 as an ID for the page, regenerated the token and then posted again in WP. All i got was a blank white screen. So i returned to wp and received the error
Your Facebook Access Token for WPBook Lite has expired. Please visit the settings page for WPBook Lite and grant a new access token. Until you do so, cross-posting to Facebook and import of comments will fail.
I will investigate this now. thanks so far, craig
yes, file ends right on “image is”
Both Profile and Page/Group Post Type Options are as posts.
yes i am receiving the same error message craig – “Caught exception in publish to page (#200) This API call requires a valid app_id. Error code: 0”
In terms of the token, it was successfully stored and detailed within the WPbook lite settings page – however, I have logged in this morning and now se the following error:
“Your Facebook Access Token for WPBook Lite has expired. Please visit the settings page for WPBook Lite and grant a new access token. Until you do so, cross-posting to Facebook and import of comments will fail.”
If it is of any help, the facebook apps advanced settings had “Remove offline_access permission:” set to disabled.
The page ID i am trying to post to is 460172777333904 (fishing page).
Many thanks John.
Hi there
I am having exactly the same error message. I am posting to group as well as page but only thee group works – wp post works fine too.
I cannot get it to post on FB page.
Debug FULL file is:
2012-07-14 19:00:16 : publish_to_facebook running, target_admin is xxxxxxx
2012-07-14 19:00:16 : Post ID is 5171
2012-07-14 19:00:16 : My permalink is https://www.xxxxx
2012-07-14 19:00:16 : Function does not exist, or no thumb
2012-07-14 19:00:16 : Post thumbail is
2012-07-14 19:00:16 : Post share link is
2012-07-14 19:00:16 : Past stream_publish, fb_response is
2012-07-14 19:00:16 : Group access token is xxxxxx
2012-07-14 19:00:16 : Publishing to group xxxxxx
2012-07-14 19:00:16 : Publishing to group, image is
2012-07-14 19:00:18 : Just published to group via api, fb_response is Array
(
[id] => 201603773200078_500506036643182
)2012-07-14 19:00:18 : Publishing to page xxxxxx
2012-07-14 19:00:18 : Publishing to page, image isAny help, more than appreciated.
craig