brasofilo
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Password Protect Custom Template Pagecool, thx mikedev
Forum: Plugins
In reply to: WP e-Commerce Plugin Spanishfound via goggle:
http://darionovoa.com/micelaneos/traduccion-para-wp-shopping-cart-de-instinct/funciona perfecto
Forum: Fixing WordPress
In reply to: To XML-RPC or not to XML-RPC, that’s the questionhi there, using AMFPHP you can connect directly to the DataBase.
using a hook you can call direct WordPress functions, i.e. get_post()
– some functions don’t work, but many do
– and you can do your own queries to the database as wellhere’s a sample script, note that i’m using AMFPHP 1.9 sintax (it’s less documented, but it’s faster than 1.2)
here’s a project that deals with this question too (although i prefer a simpler aproach)
this is the authorForum: Your WordPress
In reply to: Flash portfolio WP CMS ( Blog)hi there!
really coool site, freeden, congrats!for me, all started with this article, describing the use of swfobject, swfaddress and textPattern
as i don’t textpattern.. went for wordpress..
i’m still developing (got 3 client pages using this technique, plus mine in a near-faraway future)
they’re all working in my localhost, i’ll post a link as soon as the first one hits the webany wordpress permalink prints its own php, with the main flash on top
..and the main flash behaves with swfaddress functionality alwaysi pass the page ID by flashvars, and then use AMFPHP to query the database and get the right content, and so on inside the main flash navigation
see ya
Forum: Fixing WordPress
In reply to: WordPress with Flash and XMLfor a case like this, Safari has a great tool:
– the Activity window will show you the files that are loading (or not) and their respective paths
– it’s quite easy to detect broken paths with itForum: Themes and Templates
In reply to: How to modify the_excerptyes, please
i like happy endings
and hate unfinished threads
:o)Forum: Themes and Templates
In reply to: How to modify the_excerpti just realized this post isn’t about flash… i was looking for something else when i arrived here…
well, whatever, the info is recorded on wp databases!
long and prosperous life, WP!!
😉Forum: Themes and Templates
In reply to: How to modify the_excerptgreat article, Peter, thanks for that
marcy,
i dealt with this problem in actionscript doing a search/replace so i could eliminate all line breaks: “\n” or “< br >”, and thus converting two or more paragraphs into one single linebut then i was receiving xml data…
if you really wanna pass it by flashvars your only option is to look a php function that does that and then print the result to a flashvarin this address i found this function (not tested):
<?php function remove_extra_linebreaks($string) { $new_string=urlencode ($string); $new_string=ereg_replace("%0D", " ", $new_string); $new_string=urldecode ($new_string); return $new_string; } ?>so your code would be something like this (not tested):
<?php $myexcerpt = remove_extra_linebreaks(the_excerpt()); ?> var flashvars = { flashText: "<?php echo $myexcerpt; ?>" };Forum: Themes and Templates
In reply to: How to modify the_excerpthi there,
passing complex values via flashvars is kinda complicated…flash and wp can talk using rss feeds (reading the xml) or using the database (via AMFPHP)
usually i grab this values from the rss/xml
title link content description pubDateForum: Fixing WordPress
In reply to: wordpress environment in amfphphi there,
for anyone working amfphp and wordpressi just made this two functions that may be usefull
Get Image: get the url of the first image attachment of a given post
/** * Gets the first image of a post of the requiered type * . * . * @param $ID post_id * @param $type thumbnail, medium, large, full * @returns File URL or Null */ function get_image($ID, $type) { if($ID!='') { if ( $images = get_children(array( 'post_parent' => $ID, 'post_type' => 'attachment', 'numberposts' => 1, 'post_mime_type' => 'image'))) { foreach( $images as $image ) { // $attachmenturl=wp_get_attachment_url($image->ID); $attachmentimage=wp_get_attachment_image_src( $image->ID, $type ); // $imagelink=get_permalink($image->post_parent); } } return $attachmentimage[0]; } else { return; } }Get Pages Menu: returns all pages with order different than 0, and their subpages (this function uses EzSQL, so you have to adapt the queryes it if you don’t use this adapter)
/** * Gets all the pages that don't have page_order=0, so you can exclude pages from this menu assigning 0 to them. * This function can be expanded to get a third level of submenus. * . * . * @returns Array of objects, the first item is the first level, the others are second levels, all levels are ordered by page_order */ public function get_menu() { $pages = $this->db->get_results(" SELECT ID, post_title, post_name from wp_posts where post_status='publish' AND post_parent='0' AND post_type='page' AND not menu_order='0' ORDER BY menu_order ASC "); $menu[0] = $pages; $count = 1; foreach ( $pages as $page ) { $subpages = $this->db->get_results(" SELECT ID, post_title, post_name, post_parent from wp_posts where post_status='publish' AND post_parent='".$page->ID."' AND post_type='page' AND not menu_order='0' ORDER BY menu_order ASC"); if ($this->db->num_rows>0) { $menu[$count] = $subpages; $count++; } //echo $user->name; //echo $user->email; } return $menu; }Forum: Fixing WordPress
In reply to: wordpress environment in amfphptrevor,
thanks a lot for posting the solution!!i guess wp 2.8 broke the classic amfphp, some functions are not working, but some ARE
since I’m still in AS2, i can’t jump to something like Zend that maybe working flawless… whatever… i digress…
THANKS AGAINForum: Plugins
In reply to: [Plugin: Inline PageList] use it in a template?uau, great!
i’ll try it when i resume the project where i’ll use it
thank you for the effort
RodolfoForum: Plugins
In reply to: [Plugin: WP-SWFObject] f4v swfsi think 9.0.115 is the minimum requirement to play f4v
Forum: Fixing WordPress
In reply to: Adding SWF content to blogmaybe this is an old thread, but hell… for the records…
check the cross-domain policy for flash files