How to configure ckeditor lightbox plugin? - plugins

I am having confusion in installing lightbox plugin in CkEditor, I have follwed this link. I'd copied the "lightbox" pluginfolder to CKEditors "plugins" folder and in the CKEditor configuration file (config.js) I've added the code: config.extraPlugins = 'lightbox'; within CKEDITOR.editorConfig = function( config ) { }
I have set lightbox_plus.js script to the header of your page. BUT I am stuck at this point (Copy the "lightbox" rootfolder to a folder of your choice AND for using lightbox plus open lightbox_plus.js and set the path to lightbox folder to LightboxPlus_rootpath.) Rightnow I've copied this to my website root directory and I don't know what should I assign to LightboxPlus_rootpath. Any suggestions how to make it work?

Here are the updated steps that should help:
Extract the archive (there should be two directories referred below as "A" and "B").
A) ckeditor folder
B) lightbox folder
Copy the "lightbox" plugin folder that’s inside the (A) ckeditor/plugins folder to your website/app’s CKEditors "plugins" folder.
Copy the (B) "lightbox" folder to a location of your choice (let’s say location X) in your app/website.
In the CKEditor configuration file (config.js) add the following code:
config.extraPlugins = 'lightbox';
To use lightbox plus open the (B) lightbox folder from the (X) location and edit the lightbox_plus.js file.
Update the below variable with proper folder path in your website for the (X) location folder. By default its set to includes/javascript/:
var LightboxPlus_rootpath = 'includes/javascript/';
Add a reference to the lightbox_plus.js file inside your page’s header. Below is an example reference for lightbox_plus.js in default location. Please update the src path according to the file’s location.
<script type="text/javascript" src="includes/javascript/lightbox/lightbox_plus.js"></script>

Related

how to prevent vs code to don't access all my files

How to prevent vs code to don't access all my files?
The place where index.html is saved at is a folder that has many files inside. Please make another folder and put index.html inside, then go to File -> Open Folder and select the folder you just created. Now close the previous window and keep this new one.

Eclipse: Hide files excluded from source folder

I have multiple files of different types in a source folder in my Eclipse project (not a Java project). I know how to hide files from the Project Explorer view (using view filters). But I did not find a way to hide (not exclude) a file from the source folder. Is that possible to achieve?
Example:
Say my project has a folder: src, which contains three files: Main.java, and config1.xml, config2.xml.
Once I add src as a source folder, it along with its file children show up as source folder (see upper balloon in image) and also a simple folder (separately) (see lower balloon in image) under the same project in Project Explorer.
I know that I can set an inclusion filter so that I build only the java file, and not the xml. But how can I set a view filter so that the config1.xml file is hidden, but not config2.xml? (Clearly, I do not want to set a filter on *.xml, because that would hide both xml files.
UPDATE: When I attempt to add a resource filter according to Simon's solution, the file gets hidden from both the source folder and the folder view. I want to hide it only from the source folder view (upper balloon) and not the simple folder view (lower balloon). That way we know about the existence of config1.xml, but its exclusion from source.
If you want the file to be hidden from the view, then do the following
Open the context menu on the "src" folder and select Properties
Choose Resource > Resource Filters page
Click the "Add" button.
In the dialog, select "Exclude all" filter type option, "Files" applies
to option, and type in the file name config1.xml (Name matches)
Close all the dialogs and refresh your project in the Project Explorer
view.
The file config1.xml should no longer be visible

Zend render templates out of scripts folder

i have one problem... In my Zend project I made subfolders in views folder... So beside scripts I also have forms and templates. But when I try to render template in forms folder from some controller it automaticly looks in scripts folder and it set the scripts folder as base path... I found this function:
$this->view->setBasePath("../application/views/forms");
but problem is that it automaticly asume that there is a script subfolder in forms folder. But i dont want to create one because from my point of view is not needed.
That's because setBasePath() does this: Given a base path, sets the script, helper, and filter paths relative to it. Assumes a directory structure of: basePath/ scripts/ helpers/ filters/
Try setScriptPath() instead.

Creating a new folder in a bundle

I am creating a new bundle in my application by this way:
File Menu => New => New File... => Resources = Settings bundle...
This is the folder structure I am getting:
Test.bundle
Root.plist
en.lproj
Now I wanted to put an "Images" folder inside it directly under Test.bundle but I am unable to do so. Though I can put Images folder inside "en.lproj" folder, is it good to do that?
A bundle is a special folder that Finder displays as a file. You can ask Finder to treat it as a folder by right clicking (or control clicking) on it and choosing Show Package Contents. Finder will open a new window inside the bundle, and you can add folders and files as much as you wish.

Maintaining Directory Structure when loading local files into UIWebview on iPhone

I'm noticing a minor annoyance when working with local files in a UIWebview and hoping there is a simple workaround. As a simplified example lets say in my xCode project I have a folder called "WebProject" that contains an html file and a subfolder called "images" where the images reside. The html file references the images as you'd expect: src="images/MYIMAGE.jpg" for example, which works just dandy if this where are normal webpage. When you load the html file in a UIWebview, however, this image would not show up because it seems that all of the files are just thrown into one big bundle folder (so the image link is actually: src"MyIMAGE.jpg"). Is there anyway to enforce the directory structure of these files in the main bundle, so that this sort of thing does not happen? Thanks!
Just create the structure you want in the filesystem (using finder or whatever) and import that whole tree into your project. Make sure you select "Create folder references for any added folders"
You'll notice these folders are blue instead of the normal yellow used for groups. This folder structure will exist in the bundle and so your relative references will work as you expect.
Hope that helps.
See this page and this tech note for how to add resources, and maintain directory structure. Make sure you select the radio button that says "Create folder references for any added folders." Then when you go to write your code, folder-relative paths to the bundle will resolve just as if they are sub-directories. Because they are, even in your app's resources.