-
Posts
6,798 -
Joined
-
Last visited
-
Days Won
158
Everything posted by Soma
-
I just updated with a new version 3. First post download. I added root path to all setting that start with a "/". And also the third-party settings will now work if PW is in a subfolder from the root. Other related files you create in the /site/ folder you'll have to make sure you use include the subfolder. Files like body_templates.js you could make a php file and add root path to any template paths.
-
The content.css does add the the root subfolder to the path already. I'll do the same with the third-party plugin settings (as we can assume they're values are always a path) As for when you want to add additional resources via the Additional textarea (to overwrite settings) it hard to detect (maybe not) if theres a path from the root, as it can be anything (true,false,"string"). So if you want to add something there like ui.css you would have to add the subfolder to the path. This is in the body_templates.js you would usually have to create yourself. .. Ahhh... already edited! Glad you figured it out.
-
Yes as you said it makes a difference because the path /site/tinymce/plugins/codemagic/editor_plugin.js hence the "/" in the beginning is absolute from the web root. You should adjust the config string to have the real path /subfolder/site/...
-
you don't happen to have pw installed in a subfolder? can you copy that url and add it in the browser to see if it can load the file?
-
Well it seems not. I can reproduce this if I change the folder to 774 for example it fails to load. 775 works normally as it should. Is that on a server or locally? Edit: I also downloaded the archive and installed it on my local server. Works well. On my server too. On another PW site I'm working on too. Not sure what's going on but looks like a permission problem.
-
Diogo, I can't say without seeing more or having any error, or browser infos, firebug maybe? It doesn't work with anything or random characters. The effort is mainly having it configurable even more than it is now. I don't want to get as far as creating a module configuration, as I also don't see why. It maybe possible, but would complicate things even more.
-
I'm not really sure, but the restriction is for direct access in the browser by visitors... not on the server scripts. Still there seems to be an issue with permission I guess. Anyone else?
-
It works well here. Have you downloaded the test2? The first archive I attached was wrong. Have you put all in the right place? There sould be a textarea "Third-party Settings" if you got the right one. Try clearing cache. Try to find in firebug or alike if it fails loading anything... I don't understand. There's no module settings. It's configured all in the field settings under "input" tab on the last fieldset. There was recently a update already that ryan did to have content.css outside wire folder. This takes the same approach just goes a little further.
-
I tested this Pete, It works! If you add this in the field additional settings. editor_css : /site/tinymce/themes/cirkuit/ui.css skin : cirkuit You can even use this with current TinyMCE in PW already. BUT it, as I said above, TinyMCE is still trying to load the skin from the core TinyMCE and gets 404. It still works but don't know a way around that.
-
Unfortunately this doesn't work. You can add those to the config in the setting, and it will load it. But problem is the "skin" option needs to be set to "cirkuit" too to work. And this will make it want to load the theme from the core tinymce folder... content_css is a different shoe and already configurable and can be placed outside. This is used to style the content in the Wysiwyg. Which in current PW works well.
-
No, but I'm sure it's a permission problem with ftp user vs apache user. Try set it to 0777. Otherwise you should contact your hosting staff. Also I'm currently working on getting more options to TinyMCE. Might wanna test this?
-
But you know my main update with this is to use templates (html snippets) not the editor theme. I don't care that much about how it looks, as long as it works. I don't see currently a way to do this. Edit: The only thing would be to get Ryan to include the "cirkuit" skin in the distribution.
-
Pete, I didn't find a way to overwrite the themes/skin path via config. But the custom config section, allows you to add a line skin : cirkuit This will overwrite the default in PW. All you need to do is upload the "cirkuit" folder. If anyone knows a way around this, I glady add that support.
-
Sorry, just recognized that I attached wrong InputfieldTinyMCE folder! I just updated the download in the first post. @pete, I'm not sure what would be required, but I'll have a look. I used to use the "silver" skin_variant in my admin theme. Never used cirkuit.
-
I just tested adding a second third-party plugin "codemagic". It works! Though you have to additionally add the "tiny_mce_popup.js" from tinymce-3.4.7 folder into the "/site/tinymce/" folder to work correctly. Edit: Holy cow, first time using codemagic, what a cool tool!
-
Hey folks! I'm working on a couple new things for the TinyMCE inputfield in PW to extend it's capabilities toward using third-party plugins and html snippet templates (part of tinymce already). The thing is, until now you can only implement those stuff if you change the core distribution of it. Not any longer! I worked out a simple config setup that will give you all the freedom to use it on a per field basis even. So you could setup various templates or plugins for each TinyMCE field separate. For those interested in checking it out and help testing, I attached a folder with a updated "inputfieldTinyMCE" folder, and additionally added a "tinymce" folder which can be put where you want, but would suggest to put it in your /site/ folder. InputfieldTinyMCE folder is the one in /wire/modules/Inputfield/.. replace it with this new one. The tinymce folder contains some files already. plugins > - bramus_cssextras // advanced custom styles/ids via content.css template > - body_template1.html - content.css - body_templates.js The "bramus_cssextras" plugin is a great third-party plugin: http://www.bram.us/p...amus_cssextras/ I included this as an example how to load third-party plugins. And I use it in all PW projects already. "body_templates.js" is where you can specify templates which will be available, you then only specify the path to this in the custom field settings, it is like a proxy with an array of templates. It could be even a .php file! This is part of TinyMCE and documentation can be found here: http://www.tinymce.c...Plugin:template . To use template you also need to add "template" button and "template" plugin to enable it. "content.css" is the css you can add the path to this also in the advanced field settings. I would really appreciate any help with testing! Feel free to try install any other third-party plugins (not tinymce core plugins), or test out templates. Also attached a screenshot of the field settings I used to test this all with this setup. Again in Text form: theme_advanced_buttons1: formatselect,bramus_cssextras_classes,bramus_cssextras_ids,|,bold,italic,|,bullist,numlist,|,link,unlink,|,image,|,code,|,fullscreen,|,template plugins: inlinepopups,safari,table,media,paste,fullscreen,preelementfix,template content_css: /site/tinymce/content.css Additional TinyMCE settings: template_external_list_url : /site/tinymce/body_templates.js Third-party Plugins: bramus_cssextras : /site/tinymce/plugins/bramus_cssextras PW-TinyMCE-setup-test3.zip
-
Andrew, I don't quite understand. This has nothing to do with php at all. It's plain javascript. Nothing very special about it, just update the /wire/modules/Inputfield/InputfieldTinyMCE/InputfieldTinyMCE.js with changes I've done. I attached the file (github pull request just shows parts) for easy update if you want to try it before Ryan puts it in. Once done, you can put a configuration as in my previous post's screenshot. Create a folder in your site folder and use the path to that html template like for example "/site/templates-tinymce/mytemplate.html". Add the plugin string "template" and the button "template" into the appropriate fields. Done. No php at all. InputfieldTinyMCE.js.zip
-
you can also do this: $image = $profile->images->first(); echo "<img src='{$image->url}' height='{$image->height}' width='{$image->width}' alt='{$image->get('description|name')}' />"; in PW you can also access values of fields using get(). Adding a | between multiple names will return the first populated behaving like an "or" operand. echo $page->get("headline|title");
-
Ok I got it working so the core tinyMCE inputfield will allow custom configs with javascript objects like the "template_templates" uses [{..}] I just sent a pull request for Ryan. https://github.com/r...essWire/pull/92 This looks something like the following and allows to specify templates per field, and put templates where you want : (the last line in the screenshot is just testing... "force_br_newlines", trust me you don't want that true )
-
Glad you figured it out! Mind telling what you did? Concerning this I was about to soon find a solution to add templates easier, and per field. Ryan recently added a custom css and a textarea for additional config for tinymce configuration. Where each line would be a key:value. Testing now I found that how it's done currently, it doesn't work with adding a "template_templates:[{ ... }]" config. Because it expects to be a javascript object and not a string to work correctly. I'm working on some js vodoo to make it work in such cases. Just need a better solution than I have right now. If this is done, adding "bramus css extras" to it will make it much more configurable out of the box. I hope Ryan is in for it.
-
I use a tinyMCE inputfield copy in my site folder to do such stuff using the tinyMCE template feature. You can provide as much templates as you want ,and let's you select/preview one, then it will insert the html of the template. Template are just snippets of html and put in a folder as name.html files. You then define what and where they are using the config. http://www.tinymce.c...Plugin:template
-
Alan, my code was just assuming things. Sorry if that confuses you. But your tag pages, uses a template for sure. No way around that. It's just that if you're doing a find over ALL pages in PW to look for a field with the name "mytag", it will not be as fast as if you limit the find to a template or even branch ( or it will possibly even find another page using the same name, thus creating problems) . That's all. It may doesn't matter in a 100 page website, but will with 1million pages.
-
Yes! But I'm not getting which one? The one on the articles I guess. Try this: $tagpage = $pages->find("template=tag, name=$tag")->first(); // get the page that is the tag page itself $articles = $pages->find("template=article, tag=$tagpage"); // in case the tag on article is a page reference... you would change the template name to whatever your's are. It's good practice to limit it if you do a $pages->find(). Or better do, if you can, $pages->get("/tags/")->find(...);
-
Global you shouldn't set, because it will add it to all templates I think. Just autojoin should do the trick.
-
The reason for this is simple $pages->find("tags*=$tag"); doesn't work because "tags" field is most likely not fulltext field like "title", thus not working with *= . Try setting the field to "autojoin". Not sure though... gotta continue work. But hope this helps.