Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 24. Nov 2024, 06:32

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 14. Jul 2010, 13:12 
Offline

Joined: 22. Apr 2010, 01:14
Posts: 3
Hi Admin, I love your script, but I am trying to incorporate CKEditor, which I have working fine. The problem I have is that I want to use an IF statement. Basically if file_extension equals .xml don't use CKEditor, else please use.

In admin\_include\fun_edit.php lines 132-145 you have this

Code:
   echo "<textarea name=\"code\" rows=\"25\" cols=\"120\" wrap=\"off\">";
   // Show File In TextArea
   $buffer="";
   while(!feof ($fp)) {
      $buffer .= fgets($fp, 4096);
   }
   @fclose($fp);
   if( get_magic_quotes_runtime()) {
      $buffer = stripslashes( $buffer );
   }
   // echo htmlspecialchars($buffer, ENT_COMPAT , "UTF-8");
   echo htmlspecialchars($buffer);
   echo "</textarea><br/>";


I have changed this code to read

Code:
   echo "<textarea name=\"code\" rows=\"25\" cols=\"120\" wrap=\"off\">";
   // Show File In TextArea
   $buffer="";
   while(!feof ($fp)) {
      $buffer .= fgets($fp, 4096);
   }
   @fclose($fp);
   if( get_magic_quotes_runtime()) {
      $buffer = stripslashes( $buffer );
   }
   // echo htmlspecialchars($buffer, ENT_COMPAT , "UTF-8");
   echo htmlspecialchars($buffer);
   echo "</textarea>
   <script type=\"text/javascript\">
            CKEDITOR.replace( 'code',
 {
filebrowserBrowseUrl : './ckfinder/ckfinder.html',
filebrowserImageBrowseUrl : './ckfinder/ckfinder.html?Type=Images',
filebrowserFlashBrowseUrl : './ckfinder/ckfinder.html?Type=Flash',
filebrowserUploadUrl : './ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
filebrowserImageUploadUrl : './ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
filebrowserFlashUploadUrl : './ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'
});



   </script>


But what I require is to use both sets of code, but with an IF statement.

Whhat code would I use for IF file_extesnion equals .xml use code One else use code two.

Unsure what your definations are for file_extension throughout your program.


Top
 Profile  
 
 Post subject:
PostPosted: 14. Jul 2010, 22:08 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I'm not sure what you want to do.

- Michael


Top
 Profile  
 
 Post subject:
PostPosted: 14. Jul 2010, 23:07 
Offline

Joined: 22. Apr 2010, 01:14
Posts: 3
I use the gallery script more or less as a web content editor with a built in gallery, if you see what I mean. My users, upload photos and files to the website via the gallery, here they can edit the web pages using fun_edit.php.

I have incorporated CKEditor into it, so they have a WYSIWYG editor. But if the user goes to edit an .xml file it returns messy.

So I want to have a file extension IF Statement.

Code:
IF filextension equals .xml or .doc
don't use WYSIWYG
else
use WYSIWYG


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 76 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy