Jump to content

John Kelleher

Members
  • Content Count

    16
  • Joined

  • Last visited

Everything posted by John Kelleher

  1. Just installed ImageInterceptor but getting the following error on rendering: PHP Notice: Undefined offset: 0 in C:\CustomerData\webspaces\webspace_00125655\wwwroot\pw.appsolo.com\site\modules\TextformatterImageInterceptor\TextformatterImageInterceptor.module on line 172 PHP Notice: Undefined offset: 0 in C:\CustomerData\webspaces\webspace_00125655\wwwroot\pw.appsolo.com\site\modules\TextformatterImageInterceptor\TextformatterImageInterceptor.module on line 172 I have a single image in a body field (textarea), created using CKEditor. I added the image to an Image field and selected that single image in the WYSIWYG editor. The module is installed with no errors. Any ideas? Thanks, J UPDATE: wiped the images from the Image field in the same page. Deleted any references in the body field to the (now missing) image. Then added the same image to the Image field and dragged into the body. Now working. Clue?
  2. @ryan thanks for the followup. I've been busy trying various options with little luck. I think the problem is with the editor - I've tried both TinyMCE and CKEditor. I've tried highlight.js but also syntaxhighlighter. I have noted with CKEditor (using the settings you gave) it strips out the 'lang="php"' attribute that I suspect PBCKcode inserts. Even if I insert it manually, it gets stripped out on saving that page. One thing that someone might know about: with CKEditor on saving a code snippet using the PBCKcode popup, the rendered html looks as follows: <pre class="prettyprint linenums"><?php echo 'hi there' ?></pre> Note the class 'prettyprint linenums' - this is suggestive of prettify.js (Google Prettify) but I'm not using that anywhere, nor have. I'm at a loss where it's coming from! Rgds, J UPDATE: I sorta have it working now. Key was to remove the reference to code from the default.css styling that comes with Highlight.js. PBCKcode wasn't inserting the <code> element after the <pre>. I did have the js invoke code for highlight.js calling on 'pre code' elements but it didn't work. So I changed it to: $('pre').each(function(i, e) {hljs.highlightBlock(e)}); and together with the change in the styling (to just 'pre'), it now works. One small point - it overflows the column without any clipping (bit of a mess) so must insert linebreaks manually to tame it but small price to pay.
  3. @ryan @teppo Thanks guys for weighing in on this. Unfortunately, I'm still getting this. There is some styling happening but not what I'd expect from hightlight.js. I've done the following: all the settings for pbckcode as per @ryan's screenshot have js code in head.inc: <script src="http://yandex.st/highlightjs/7.3/highlight.min.js"></script> have css ref in head.inc: <link rel="stylesheet" href="http://yandex.st/highlightjs/7.3/styles/default.min.css"> Also tried: <link rel="stylesheet" href="/site/templates/styles/highlight.css"> have call to highlight.js in foot.inc hljs.initHighlightingOnLoad(); have my body field for that template using CKEditor (which works) and now PBCKcode showing in toolbar. Added simple php code to the <> modal box but as I say, no styling happening. UPDATE: I have also edited the config.js file in the CKEditor plugin folder as per instructions from PBCKcode. UPDATE: I also added (in foot.inc) the following to target <pre> elements with highlight: $(function() { if ($('pre').length) { $.getScript('/site/templates/scripts/highlight.pack.js', function() { $('pre').each(function(i, e) {hljs.highlightBlock(e)}); }); } }); Should I be providing more explicit styles though I believe hightlight.js just detects the language automatically. This is what I get at the browser: <pre class="prettyprint linenums"><?php echo 'test'?></pre> I checked @teppo site and didn't see anything like I found there: i.e. lang and class attributes. <pre lang="php" class="php" xml:lang="php"> This looks promising but output is bland courier typeface with no decoration. Thanks for the help. J Update: I do see some syntax highlighting in the pop-up PBCK box when editing the field. However, this is lost on browser rendering.
  4. @teppo: appreciate your taking time while about answering this. I did add pbckcode to extra plugins (sourcedialog already there). I added the changes to config.js for CKEditor recommended by pbckcode. I'm also (for the record) using ACF 'On' and Purifier 'On', with regular editor (not inline). I <pre>'d the code snippets in the PW CKEditor window. But according to ppbkcode I should be seeing an extra button in the toolbar for CKEditor something like '<>' which would throw up a window to let me pick a language and enter the code snippet. Or is this so? You can see the page I'm editing here: http://www.pw.appsolo.com/blog/blog-posts/azure-deployment/ At the very bottom (away from possible influence of the <ol>), you'll see two lines - one uses <pre> from the CKEditor and the other doesn't. I have the following call to highlight.js in my foot.inc with the following js at the bottom of the page: hljs.initHighlightingOnLoad() Also, have the following at the top of the page (in my head.inc), this recommended by highlight.js site: <link rel="stylesheet" href="http://yandex.st/highlightjs/7.3/styles/default.min.css"> <script src="http://yandex.st/highlightjs/7.3/highlight.min.js"></script> Appreciate you may be on business so don't let me get in the way of business! J
  5. @teppo: Hi, I've gone with your suggestion of CKEditor as there are several different formatting needs (css, php, csharp, html). I've installed the PBCKcode plugin and changed the body field to use CKEditor. I've added the PBCKcode as a plugin on the input field too. However, I'm not getting any changes to the CKEditor when editing the field - I expect I should see the <> button to edit the code. Any ideas? Thanks, J UPDATE: Couldn't get PBCKcode to show as extra option on CKEditor. Switched back to highlight.js but seemingly need to prefix code with both <pre> and <code> in that order. Even then, I'm not sure highlight is working - I'm getting the same formatting as suggested by content.css for TinyMCE. Surely, this isn't so hard?
  6. @teppo: Thanks for suggesting highlight.js - have it working though it needs <pre><code>....</code></pre> - I can format the snippet in TinyMCE for preformatted but is there any easier way to mark up the snippet with <code> than opening the HTML editor and adding the tags? Guess this is a similar problem to adding 'brush: js' with SyntaxHighlighter - something to do with TinyMCE configuration? Thanks again, J
  7. @kongondo @teppo thanks but I'm looking to place some pieces of c-sharp or css or whatever into a blog post. I thought just marking it in TinyMCE as <pre> would do the job and there is feedback in the editor that suggests (see image) this works - but it doesn't render as anything but ordinary <p>. I've also tried placing multiple '~' ahead of the code to format it as a code block but no luck. The Markdown Extra seems to work for numbered lists though - I started using the Markdown Extra text formatter since TinyMCE seemed to strip out the numbered list when rendered. Image is here: http://www.tiikoni.com/tis/view/?id=f411b49 BTW: how do I post an image in this post? Also, I've just tried to install SyntaxHighlighter but no joy on that front yet.
  8. Hi, looking to place some programming code into a page and using Markdown Extra as a text-formatter (only). I've used Markdown Extra elsewhere but none of the typical formatting codes seem to be working. For example, placing a fixed number of '~' symbols before and after text should render that block as code. Alternatively, placing min. 4 spaces before a line has the same effect. Does Markdown Extra work properly or is there another way to accomplish placing of code in a textarea field? Thanks, J
  9. RT @adventuresofrob: Tell you what, these dyson airblade urinals don't half make a mess

  10. How Sport Drinks Companies Trick Us (Plus 4 DIY Recipes) http://t.co/ArztHwZFnB

  11. Belay my last - I had set debug to true in my config.php. All well now. For what it's worth, I've spent a long time finding a CMS that provided just enough support but let me play with my html/css/js independently - liking what I see so far. I'm a convert from Kirby & Stacey.
  12. Thanks to Nikola and Spoetnik for fixing my 404 problems under IIS. I do a lot of work in ASP.NET but I'm growing weary of trying to sort out .htaccess issues in LAMP setups. And those Rewriterules are crazy! I still have one small problem that I wonder if anyone has seen. Now that I can get into the admin pages, I find that in the footer of each page there is a lot of debug-like information, although nicely formatted - e.g. Pages Loaded, Sessions, Modules. These are in accordian views and neatly presented but I haven't seen them in the demo or on my MAMP install. Would appreciate any ideas.
  13. Good ol' Jamie's 15 min meals - pity it took an hour ;)http://t.co/qgeVdww2pA

×
×
  • Create New...