php,ckeditorRelated issues-Collection of common programming errors
user3367639
php codeigniter
So, I am making a from select with the code below: // Controller Code $data[‘message_to_options’] = array(‘1’ => ‘username 1′,’2’ => ‘username 2’, );// View Code <?php echo form_dropdown(‘message_to’, $message_to_options); ?>This all works great. Except the users needs to be dynamically created not hard coded. I have the following code from ion_auth for code igniter. This gets all the users in the system. Which Is what I want to do. $users = $this->ion_auth->users()->resul
Ed Cottrell
php mysql database
Here is my database connection code, whenever i sign up in form it always says “syntax error, unexpected T_STRING in”<?php//Database Connection Settingsmysql_connect(“localhost”, “root”, “”);mysql_select_db(“project mix”);global $connection;$connection = @mysql_connect(“”) or die(‘Connection could not be made to the SQL Server. Please report this system error at <font color=”blue”>[email protected]</font>’);@mysql_select_db(project mix,$connection) or die(‘Connec
Timothy Carter
php javascript jsp splash-screen
I want to know how to show a splash screen (like a gif or jpeg file) on the user screen during my script execution.Thank you for your help.
mikeTheLiar
php try-catch composer-php
I am trying to install Composer (http://getcomposer.org/download/) on a GoDaddy-hosted Linux server but it’s not working. No matter which method I try, I eventually run up against some version of the following error:Parse error: syntax error, unexpected ‘{‘ on line 290.Line 290 refers to line 290 in this file: https://getcomposer.org/installer which is the start of a try-catch block. And, indeed, even a simple script like:echo ‘<?php echo “Hello World “; try {echo “Goodbye”;} catch (Except
Pieter
php strpos
This is my code:<?php $url = “http://www.uhasselt.be/collegeroosters/2009_2010_298_5_10.html”; $headers = get_headers($url, 1); print_r($headers); $contloc = $headers[“Content-Location”]; echo “Content-Location: ” . $contloc . “\n”; $soft404test = strpos($contloc, “http://www.uhasselt.be/404b.htm”) ? true : false; var_dump($soft404test); ?>This is its output:Array ([0] => HTTP/1.1 200 OK[Content-Length] => 2030[Content-Type] => text/html[Content-Location] => http://www.uhasselt
Guillermo Phillips
php oracle blobs
I am attempting to transfer a set of photos (blobs) from one table to another across databases. I’m nearly there, except for binding the photo parameter. I have the following code:$conn_db1 = oci_pconnect(‘username’, ‘password’, ‘db1’); $conn_db2 = oci_pconnect(‘username’, ‘password’, ‘db2’);$parse_db1_select = oci_parse($conn_db1, “SELECTREF PID,BINARY_OBJECT PHOTOGRAPH FROMBLOBS”);$parse_db2_insert = oci_parse($conn_db2, “INSERT INTOPHOTOGRAPHS(PID,PHOTOGRAPH) VALUES(:pid,:photo)”); oci_e
Tianyu
php c gcc llvm llvm-gcc
I tried to generate LLVM intermediate code by callingllvm-gcc -emit-llvm -I/mypath/ -c main.c -o main.oIt works perfectly without any warnings or errors if I manually type this command in the terminal. However I have built a website that can automate this process by calling exec function in PHP like below.exec(“llvm-gcc -emit-llvm -I/mypath/ -c main.c -o main.o”,$msg,$ret);It will still generate .o file with a warning. The warning says that Potential incompatible plugin version. GCC: 4.5.3. Expe
John Conde
javascript php jquery ajax
I’m simply trying to read in a field from a text box, pass the value via ajax to PHP and then store the data in a mysql table. The table is already set up and ready to go, all I need is to insert values. Here is my js file var address = $(“input#email”).val(); //If submission is valid if(submitForm == “true”){$.ajax({ url: “bin/process.php”, type: “POST”, data: {email: address}, success: function(response) { $(‘#message’).html(response); }}); return false; }And then my PHP looks like this
user2718671
php wordpress
Is it possible to create sub menu pages depending on the options? In my plugin option page I got an input field for titles (of the submenu pages). These titles are separated by commas. I tried following in my plugin script:function my_menu() {global $page_hook_suffix;$page_hook_suffix = add_menu_page(…); //adding main menu$titles=get_option(‘my_option_name’);$titles=explode(“,”,$titles);if(!empty(get_option(‘my_option_name’))){foreach($titles as $title){ $slug = str_replace(‘ ‘, ‘_’, $titl
FoolishSeth
php forms html-select
I am trying to save what state a user select after ‘POST’ the form action runs on the same page, but I keep getting unexpected T_IS_EQUAL, expecting ‘}’ error. What am I missing? I have the following code:<select style=’width:50px; float:left; position:relative; left:-160px; top:2px; border-radius:3px; ‘ project=’statelist’ class=’statelist’ name=’statelist’>$state = array( ‘AZ’,’AL’,’AK’,’AR’, ‘CA’,’CO’, ‘CT’,’DE’,’DC’,’FL’, ‘GA’, ‘HI’,’ID’,’IL’, ‘IN’,’IA’,’KS’,’KY’,’LA’,’ME’,’MT’,’NV’,’
Andy
php javascript ckeditor
I’m using Ckeditor version 3.1 within CakePHP 2.xI can get the editor to load and replace the textarea. The HTML is saved to the database with HTML formatting tags like this:<p> <strong><p> This is a test</p> </strong></p>When I insert that into the CkEditor I get the following appearing in the editor screen:<p> <strong><p> This is a test</p> </strong></p>If I use html_entity_decode prior to
Aamir Shahzad
javascript html asp.net css3 ckeditor
I am using CKEditor asp.net page for allowing client to easily edit/format text. Also i am using tabs option within CKEditor as shown in the fig. attached. But tabs are not working at all. Initially i have created tabs withJS. I thought it’s the JS that not working with CKEditor so i have chosen alternative solution using css3. But tabs are still not working in CKEditor. I have searched on CKEditor forum but unable to get good resource or help. For css3 I am using checkbox hidden through opacity
Josh
javascript ckeditor
When i am passing HTML to a CKEditor instance, a P tag is being inserted within the HTML producing unexpected results.For example, with the following code:CKEDITOR.instances[“myEditor”].setData(“<div>1</div><div>2</div>”);the editor does not display them as block elements (it outputs as “12” inline). Calling getData() and i see the HTML is reformatted incorrectly as:”<div> <p>1</div><div>2</div></p> ” I’ve played with the enterMode conf
meagar
div ckeditor carriage-return
I noticed that CkEditor has problems with using entermode br (mainly slowness after typing text for a long time).So I’m looking into the other entermodes (p and div).I see that entermode p is adviced by CkEditor.However, this introduces margins below the content, which is not desired (as the users are not used to typing paragraphs).So, I was thinking of using entermode div , which seems more correct in this case.However, I want to avoid introducing problems by using entermode div.Are there known
G.Martin
ckeditor wysiwyg
I’ve got several sites up and running on Nginx, but no editor loads. Wysiwyg is configured properly with CKeditor downloaded and in the libraries directory.At this point I’m unsure if its something I’m missing, or something in my config that is blocking it.My current config: http://pastebin.com/yreZ0kr1EDIT:I’ve uninstalled the WYSIWYG module, reinstalled it, and it cannot see CKeditor. If I paste the url into the address bar, I can access the CKeditor.js file directly.EDIT2:Found out that the
Dan
javascript ios ckeditor
I suppose this is a more specific version of my recent question Browser-sniffing alternative for bugs/misbehaviors (NOT lack of features). CKEditor is known not to work on certain clients like iOS Safari. Rather than use hackish browser detection, is there a way to see at runtime whether ckeditor will work on the current browser so that I can not load it or fall back to an alternative in case it won’t?
Tom van Enckevort
ckeditor
By default, CKEditor’s enter key behavior is adding a <p> tag and starting a new paragraph. But that behavior can be modified in the configuration with a .EnterMode parameter.I’m wondering if there is a way to change Enter key behavior in the runtime, by putting a button into its tool bar, to switch between <p> and <br> (single line vs double line), just like as in Word.Any ideas on how to do this?
Greg Pete
javascript jquery html ckeditor
Can I change CKEditor’s autoGrow_maxHeight at runtime (jquery or etc)? I’ve tried CKEDITOR.replace (‘editor1’, { autoGrow_maxHeight: x });And also destroying the instance before trying to recreate it, with a new maxHeight. I’m trying to keep the maxHeight to the height of the browser window (minus about 220 px of other stuff on the page). This is when I do the main replace of the text area:autoGrow_maxHeight: (window.innerHeight-220)This works for the initial creation of the editor. But the prob
jewelsea
webview ckeditor javafx-2
I’m using a CKEditor 4.1.1 instance within my JavaFX apps’ WebView. When i hit the paste-button of the editor, a window opens that tells me that the security settings of the browser prevent clipboard access.As the browser in this case is the WebViewcomponent, how can i alter the according settings to enable clipboard access?Test App:import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.web.WebView; import javafx.stage.Stage;public class SimpleWebView extends Appli
matwonk
javascript jquery textarea ckeditor
I’m running into an issue where I have a button on my page that has a CKEditor. When the button is pressed I want to append text to the editor. I used the following code: $(‘#mtxDescription’).append($(this).data(‘key’)); CKEDITOR.instances[‘mtxDescription’].updateElement();However this does not work. The editor does not reflect the change. However when I inspect the editor I find that the textarea does show the appropriate text appended, its just the editor is not showing it. Does anyone know o
Web site is in building