| [21] | 1 | <?php |
|---|
| 2 | |
|---|
| 3 | /* |
|---|
| 4 | |
|---|
| 5 | ___Canvas Plugin Form___________________________________________ |
|---|
| 6 | |
|---|
| 7 | Outputs the Lightbox form for plugins, building individual |
|---|
| 8 | form elements based upon the plugin definitions. |
|---|
| 9 | |
|---|
| 10 | ________________________________________________________________ |
|---|
| 11 | |
|---|
| 12 | */ |
|---|
| 13 | |
|---|
| 14 | require( dirname(__FILE__) . '/../../../wp-config.php' ); |
|---|
| 15 | if (!(is_user_logged_in() && current_user_can('edit_posts'))) |
|---|
| 16 | die("Athentication failed!"); |
|---|
| 17 | |
|---|
| 18 | |
|---|
| 19 | global $wpdb, $canvas; |
|---|
| 20 | |
|---|
| 21 | $block_id = $_GET['block_id']; |
|---|
| 22 | |
|---|
| 23 | ?> |
|---|
| 24 | |
|---|
| 25 | <div class="lbContent"> |
|---|
| 26 | |
|---|
| 27 | <?php |
|---|
| 28 | global $wpdb, $canvas; |
|---|
| 29 | $block = $wpdb->get_row("SELECT * FROM ".$canvas->main." WHERE block_id = '$block_id'"); |
|---|
| 30 | |
|---|
| 31 | if($block->uri != '') $link = '<a href="'.$block->uri.'">'.$block->author.'</a>'; |
|---|
| 32 | else $link = $block->author; |
|---|
| 33 | |
|---|
| 34 | // Get module name |
|---|
| 35 | include_once('RCCWP_CustomWriteModule.php'); |
|---|
| 36 | $customWriteModule = RCCWP_CustomWriteModule::Get($block->module_id); |
|---|
| 37 | if ($block->duplicate_id ==0 ) |
|---|
| 38 | $block->module_title = $customWriteModule->name; |
|---|
| 39 | else |
|---|
| 40 | $block->module_title = $wpdb->get_var("SELECT duplicate_name FROM ".$canvas->duplicates." WHERE duplicate_id = ".$block->duplicate_id); |
|---|
| 41 | |
|---|
| 42 | //echo '<h3>'.$block->module_title.'</span> by '.$link.'.</h3><p>'.wptexturize($block->description).'</p>'; |
|---|
| 43 | |
|---|
| 44 | $content = '<h3>'.$block->module_title.''; |
|---|
| 45 | if($block->author != '' && $block->uri != '') |
|---|
| 46 | $content .= '<span>by <a target="new" href="'.$block->uri.'">'.$block->author.'</a></span>'; |
|---|
| 47 | if($block->description != '') |
|---|
| 48 | $content .= '<p>'.$block->description.'</p>'; |
|---|
| 49 | |
|---|
| 50 | echo $content; |
|---|
| 51 | |
|---|
| 52 | |
|---|
| 53 | ?> |
|---|
| 54 | |
|---|
| 55 | <a id="cancel" href="javascript:void(0)" class="lbAction" rel="cancel">Close</a></h3><div class="lbContent_inside"> |
|---|
| 56 | |
|---|
| 57 | <form id="lightbox_form"> |
|---|
| 58 | <?php |
|---|
| 59 | |
|---|
| 60 | echo ''. |
|---|
| 61 | '<strong>Module Folder:</strong> modules/'.$customWriteModule->name. |
|---|
| 62 | '<br/><br/><strong>Module ID:</strong> '.$block->block_id. |
|---|
| 63 | '<br/><br/><strong>Zone:</strong> '.$block->zone. |
|---|
| 64 | '<br/><br/><strong>Position:</strong> '.$block->position. |
|---|
| 65 | '<br/><br/><strong>Author:</strong> '.$block->author.''. |
|---|
| 66 | '<br/><br/><strong>Author URI:</strong> '.$block->uri.''; |
|---|
| 67 | |
|---|
| 68 | ?> |
|---|
| 69 | </form> |
|---|
| 70 | </div> |
|---|
| 71 | </div> |
|---|