Changeset 492434
- Timestamp:
- 01/19/2012 11:59:23 PM (14 years ago)
- Location:
- gliffy-plugin-for-wordpress/trunk
- Files:
-
- 7 edited
-
gliffy-plugin-for-wordpress.php (modified) (8 diffs)
-
gliffy-wp-diagrams-new.php (modified) (1 diff)
-
gliffy-wp-diagrams.php (modified) (4 diffs)
-
gliffy-wp-popup.php (modified) (4 diffs)
-
lib/src/Gliffy.php (modified) (1 diff)
-
lib/src/config.php (modified) (1 diff)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
gliffy-plugin-for-wordpress/trunk/gliffy-plugin-for-wordpress.php
r139901 r492434 4 4 Plugin URI: http://wiki.gliffy.com/display/APIAPPS/WordPress+Plugin 5 5 Description: Create diagrams and insert them into your posts or pages! Look for the "Diagrams" menu when you activate the plugin, and use the Gliffy button on the media bar to insert diagrams. Once activated, make sure to <a href="options-general.php?page=gliffy-config">configure</a> the plugin in the settings menu. 6 Version: 0. 1.36 Version: 0.2 7 7 Author: Gliffy, Inc. 8 8 Author URI: http://www.gliffy.com/ … … 220 220 add_filter('media_buttons_context', 'gliffy_button'); 221 221 222 //add_filter('media_upload_tabs', 'gliffy_tab_names');222 add_filter('media_upload_tabs', 'gliffy_tab_names'); 223 223 add_action('media_upload_gliffy', 'gliffy_media'); 224 224 225 //226 225 add_action("type_url_form_gliffy", "gliffy_type_url_form"); 227 228 //229 //add_filter('media_send_to_editor', 'gliffy_media_send_to_editor', 10, 1);230 231 // add_action('media_upload_gliffy_new', 'gliffy_tab_new');232 233 // Disabled the user_menu for now, let's just use the email address of the logged in user234 //add_action('admin_menu', 'gliffy_user_menu');235 226 236 227 /** … … 240 231 add_filter("authenticate", "gliffy_login", 100, 3); 241 232 242 //add_action("wp_login", "gliffy_login");243 244 233 add_action("wp_logout", "gliffy_logout"); 245 234 … … 256 245 add_action('admin_menu', 'gliffy_top_menu'); 257 246 258 259 247 // Registers account specific key value properties 260 248 add_action('admin_init', 'gliffy_register_settings'); 261 249 262 // add_action('edit_page_form','testMe');263 // add_action('profile_personal_options', 'gliffy_personal');264 250 } 265 251 … … 398 384 } 399 385 400 function gliffy_media() { 401 include "gliffy-wp-popup.php"; 402 } 403 404 //function gliffy_type_url_form() { 405 //// echo "Gliffy type url form"; 406 // error_log("%%%%%%%%%% HELLO WORLD!"); 407 //} 408 // 409 //function gliffy_media_upload() { 410 // 411 //} 412 // 413 //function gliffy_media_send_to_editor($html) { 414 // return $html; 415 //} 386 function gliffy_tab_names($tabs) { 387 $newtab = array('gliffy' => __('Gliffy Diagram', 'gliffydiagram')); 388 return array_merge($tabs, $newtab); 389 } 390 391 function gliffy_media($context) { 392 include('gliffy-wp-popup.php'); 393 } 416 394 417 395 function gliffy_options_menu() { … … 421 399 function gliffy_top_menu() { 422 400 $image = get_option('siteurl').'/wp-content/plugins/gliffy-plugin-for-wordpress/images/Logo_16x16.png'; 423 // add_object_page('Diagrams', 'Diagrams', 2, __FILE__, 'gliffy_diagrams_page', $image);424 // add_submenu_page('Diagrams', 'Diagrams', 'Edit', 2, __FILE__, 'gliffy_diagrams_page');425 401 add_object_page('Diagrams', 'Diagrams', 2, __FILE__, 'gliffy_diagrams_page', $image); 426 402 add_submenu_page(__FILE__, 'Diagrams', 'Edit', 2, __FILE__, 'gliffy_diagrams_page'); 427 403 add_submenu_page(__FILE__, 'Diagrams', 'Add New', 2, "gliffy-add", 'gliffy_diagrams_new_page'); 428 404 } 429 430 //function gliffy_user_menu() {431 // // Adds the Gliffy Profile page under the Users Menu432 // add_submenu_page('users.php', 'Gliffy Profile', 'Gliffy Profile', 2, "gliffy-user", 'gliffy_profile_page');433 //}434 405 435 406 function gliffy_register_settings() { … … 455 426 } 456 427 457 /**458 * Includes the html page that renders the Users/Gliffy Profile459 */460 //function gliffy_profile_page() {461 // include('gliffy-wp-profile.php');462 //}463 428 464 429 … … 474 439 475 440 while ($macro_begin_index) { 476 // echo "macro_begin_index=" , $macro_begin_index , "<br/>";477 // echo "content{" , $content , "}<br/>";478 479 441 $macro_begin_index = strpos($content, $macro_begin); 480 // echo "macro_begin_index=" , $macro_begin_index , "<br/>"; 442 481 443 482 444 if ($macro_begin_index) { 483 445 $macro_end_index = strpos($content, $macro_end, $macro_begin_index); 484 // echo "macro_end_index=" , $macro_end_index, "<br/>"; 446 485 447 486 448 // Get the whole macro 487 449 $macro = substr($content, $macro_begin_index, $macro_end_index - $macro_begin_index + $macro_end_len); 488 // echo "macro=" , $macro, "<br/>";489 450 $macro_len = strlen($macro); 490 // echo "macro_len=" , $macro_len, "<br/>";491 451 492 452 // Parse the macro params and pass to function 493 453 $param_begin = $macro_begin_index + $macro_begin_len; 494 // echo "tbegin=", $tbegin , "<br/>";495 454 $param_end = $macro_end_index - $param_begin; 496 // echo "tend=", $tend, "<br/>";497 455 498 456 $csv_parameters = substr($content, $param_begin, $param_end); 499 // echo "csv_parameters=" , $csv_parameters , "<br/>";500 457 $parameters = strtok($csv_parameters, ","); 501 // echo "parameters=" , $parameters , "<br/>";502 458 503 459 // todo: parse the parameters into individual tokens 504 460 505 461 $link = gliffy_create_diagram_link($parameters, "L"); 506 // echo "gliffy_content=" , $gliffy_content, "<br/>";507 462 508 463 // Replace the macro with our new content 509 464 $content = str_replace($macro, $link, $content); 510 // echo "content=" , $content, "<br/>";511 465 } 512 466 } -
gliffy-plugin-for-wordpress/trunk/gliffy-wp-diagrams-new.php
r138961 r492434 43 43 //]]> 44 44 </script> 45 46 <?php47 48 //<div id="TB_overlay" style="49 // position: fixed;50 // z-index:100;51 // top: 0px;52 // left: 0px;53 // height:100%;54 // width:100%;55 // background: url(/wp-includes/js/thickbox/macFFBgHack.png) repeat;56 // ">57 //58 // <iframe id="gliffy_editor"59 // frameborder="1"60 // style="61 // position: relative;62 // margin: 30px;63 // height:90%;64 // width:95%;65 // "66 // src="<?php echo $launch_link >"67 // >68 // <p>Your browser does not support iframes.</p>69 // </iframe>70 //</div>71 ?>72 45 <iframe id="gliffy_editor" 73 46 frameborder="0" -
gliffy-plugin-for-wordpress/trunk/gliffy-wp-diagrams.php
r139007 r492434 10 10 <?php 11 11 try { 12 12 13 error_log("**** about to get instance"); 13 14 $gliffy = gliffy_getinstance(); … … 15 16 $diagrams = $gliffy->getDiagrams(); 16 17 error_log("**** back from get diagrams"); 18 17 19 } 18 20 catch (GliffyException $e) { … … 57 59 58 60 echo "<tr>"; 59 // echo "<th class='check-column' scope='row'><input type='checkbox' value='", $diagram->id, "' name='post[]'/>";60 61 echo "<th class='check-column' scope='row'></th>"; 61 62 echo "<td>", $diagram->id, "<br/>"; … … 69 70 echo "<span class='view'>$img</span>"; 70 71 } 71 //echo " | <span class='delete'><a href='", gliffy_current_page(), "' title='Delete diagram'>Delete</a></span>";72 72 echo "</div>"; 73 73 echo "</td>"; -
gliffy-plugin-for-wordpress/trunk/gliffy-wp-popup.php
r138940 r492434 92 92 <th id="author" class="manage-column column-title" style="" scope="col">Author</th> 93 93 <th id="visibility" class="manage-column column-title" style="" scope="col">Visibility</th> 94 <!--<th id="versions" class="manage-column column-title" style="" scope="col"># of Versions</th> -->95 <!--<th id="moddate" class="manage-column column-title" style="" scope="col">Modify Date</th> -->96 94 </tr> 97 95 </thead> … … 105 103 <th class="manage-column column-title" style="" scope="col">Author</th> 106 104 <th class="manage-column column-title" style="" scope="col">Visibility</th> 107 <!--<th class="manage-column column-title" style="" scope="col"># of Versions</th> -->108 <!--<th class="manage-column column-title" style="" scope="col">Modify Date</th> -->109 105 </tr> 110 106 </tfoot> … … 115 111 foreach( $diagrams as $diagram ) { 116 112 $launch_link = $gliffy->getEditDiagramLink($diagram->id, gliffy_current_page(), 'Back to Wordpress'); 117 //$launch_link = str_replace( 'gliffy-wp-popup.php', 'gliffy-wp-launch.php', $_SERVER['PHP_SELF'] );118 //error_log("**** launch_link=" . $launch_link);119 113 $returnURL = gliffy_current_page(); 120 // $launch_link = "/wp-content/plugins/gliffy-wp/gliffy-wp-launch.php?diagram_id=" . $diagram->id . "&return_url=" . $returnURL;121 122 114 echo "<tr>"; 123 115 echo "<th scope='row'><input id='$diagram->id' name='diagram' type='radio' onclick='GliffyMacro.setDiagramId($diagram->id);' value='$diagram->id' /></th>"; 124 116 echo "<td>", $diagram->id, "<br/>"; 125 117 echo "<div class='row-actions'>"; 126 // echo "<span class='edit'><a href='", $launch_link, "' title='Edit diagram' onclick='growIframe();'>Edit</a></span>";127 118 128 119 if ($diagram->is_public) { … … 138 129 139 130 error_log("**** IS_PUBLIC=".$diagram->is_public); 140 // error_log("**** IS_PRIVATE=".$diagram->is_private);141 131 142 132 echo "<td>", ($diagram->is_public) ? 'public' : '<span style="color: red;">private</span>', "</td>"; 143 // echo "<td>", $diagram->num_versions, "</td>";144 // echo "<td>-</td>";145 133 echo "</tr>"; 146 134 } -
gliffy-plugin-for-wordpress/trunk/lib/src/Gliffy.php
r138940 r492434 505 505 $params["launchDiagramId"] = $diagramId; 506 506 507 if ($returnURL != null) $params["returnURL"] = urlencode($returnURL);507 if ($returnURL != null) $params["returnURL"] = $returnURL; 508 508 if ($returnText != null) $params["returnButtonText"] = urlencode($returnText); 509 509 510 $params["returnURL"] = str_replace('/gliffy/', '', $params['returnURL']); 510 511 $this->updateToken(); 511 512 $theLink = $this->_rest->get($url,"text/xml",$params,true); -
gliffy-plugin-for-wordpress/trunk/lib/src/config.php
r138940 r492434 18 18 * @global string $_GLIFFY_root 19 19 */ 20 $_GLIFFY_root = get_option('gliffy_root');20 $_GLIFFY_root = "http://www.gliffy.com"; 21 21 22 22 -
gliffy-plugin-for-wordpress/trunk/readme.txt
r382989 r492434 3 3 Tags: gliffy, diagram, drawing, draw, flowchart, uml, post, page, plugin, edit 4 4 Requires at least: 2.8 5 Tested up to: 3. 1.26 Stable tag: 0. 1.35 Tested up to: 3.3.1 6 Stable tag: 0.2 7 7 8 8 The Gliffy plugin allows you to create diagrams and insert them into your posts or pages. Draw all kinds of diagrams: flowcharts, UI mockups, UML, etc
Note: See TracChangeset
for help on using the changeset viewer.