FORUMS CLOSED DUE TO SPAM. YOU STILL CAN ADD POST!

David posts

Feed 1493 posts

html in title appears as code in front end

Hi Phil –

In the Administration > Settings page in the backend there is an “Allow HTML in Title” option. Can you confirm that the checkbox with it is ticked/filled?

Not to sure what to say about the “funky” display under your pages tab. Maybe a screenshot? (You can always post it to TinyPic.com and paste the link here between exclamation marks to display in the forum.)

 

Contributed Plugins page on Madebyfrog

I have just (30.06.2009) re-arranged the contributed plugins page on the MadeByFrog site. Could I ask all plugin devs to check your information from time to time, and email any link/info/etc. changes to madebyfrog at gmail dot com. Other suggestions for improvements are also welcome. Thanks!

Also, a huge “thankyou” in any case to everyone contributing plugins for Frog. I realize that this is sometimes self-interested :) but by sharing your work, you make the world a happier place!

 

Fading success/fail messages

In 0.9.5 RC1, Martijn introduced a fade-out for “success” and “fail” messages. I liked the concept, because when I’m working away for a bit on something, I can forget whether I have really saved since my last bit of twiddling!

However, user feedback was that it was too jumpy, so it was removed from 0.9.5’s stable release. I’ve just got around to looking at the CSS to take the message DIV out of the box sequence, and I think it’s working OK.

If you would like to test this — and I hope that some will — then download the FadingMessages.zip file from the Google Code download page. If the sense is that this is working well, we can re-introduce it in SVN.

I’ve tried this with FF3, IE7, Chrome3, and Opera9 (I’m still on WinXP), and it seems happy in those browsers.

Please feel free to suggest enhancements!

Thanks!

 

Comment Plugin Admin Error

I’m running on apache 2.0.63, PHP 5.2.8 and mysql 4.1.22.

This is another one that I am unable to replicate, but it is interesting to see this environment.

Could others who have experienced this problem post here the version of mySQL being used? Thanks!

 

displaying/not displaying comments and form

Hmmm… I can’t replicate that, Phil. Even saving a page as “open”, and then re-saving with comment status as “none” — it all behaves properly. You have saved the page(s) in question with “Comments -none-” underneath the editing area?

I assume this is with 0.9.5…? Puzzled!

 

Trying to get root ancestor page on level 1

And just now connecting this up from something similar by Andy (for slug).

 

Current Page

LOL. :P

Meanwhile, thought it might be worth connecting this up with something similar from avagraphique

 

Current Page

Andy, that’s pure genius. I guess it could be even a bit more compact (as if it mattered) with:

list($parent) = split('/', $this->url); 
echo $parent;

This ought to go into the docs!!

 

displaying/not displaying comments and form

Hi Phil: A simple problem, now fixed in SVN at r445. What you want to do is change

    if (Plugins::isEnabled('comment'))

to

    if (Plugin::isEnabled('comment'))

(no “s” on “Plugin”) and that should do it.

 

Link to another page in a drop down menu from another drop down list item

I intially thought about header location using php but this wouldnt work because its already passed the html tag.

Not if you set the Layout for the “dummy” page to -none- … maybe?

 

WYMeditor plugin

Quick update: I’ve just installed this (without Asset Manager so far), and first impression is quite wonderful. :) It’s working nicely so far, although I haven’t done any “stress testing” yet!

Great job, M! And thanks again.

 

WYMeditor plugin

… I just thought it might be a nice addition to Frog.

And I am so glad you did, M! :)

I hope to try it out this evening.

 

WYMeditor plugin

Ahh, thank you M! I first raised the possibility of getting this into Frog back on 11 November 2007. :) I’ll be checking this out quickly! If it works in tandem with tuupola’s Assets Manager, that will be a terrific combination.

 

Display sidebar only if children + only display level 1 children

That means the conditions are failing for some reason.

Yes, and this was the failing code:

... && $this->level > 0)

Oddly enough, this works fine in 0.9.4 (where I had tested the menu code on a localhost install). It turns out that in 0.9.5, the format for this must be:

... && $this->level() > 0)

with the ‘()’ parentheses following “level”, otherwise it fails to report a value. Very strange. Something must have changed! But something to be aware of when using $this->level() in 0.9.5!

 

And what about Russian translation?

@Enzo – Have you seen this thread?

 

Trying to get root ancestor page on level 1

This is quite nifty, avagraphique! Thanks!

Can see uses for this…

 

Display sidebar only if children + only display level 1 children

Hmm… That means the conditions are failing for some reason. (Doh!) Is the site live? or localhost development?

Are you up for a quick online chat about this? If so, shoot me a note at madebyfrog at gmail etc.

 

Display sidebar only if children + only display level 1 children

It is possible that this will do the job for you. It’s a mashup of some find-level-1-pages code, and the sidemenu code that crusnac was just looking for:

<?php foreach($this->find('/')->children() as $topPage): ?>
<?php if (in_array($topPage->slug, explode('/', $this->url))) { $thisPage = $topPage->slug; } ?>
<?php endforeach; ?>

<ul>
<?php
   if (count($this->find($thisPage)->children()) > 0 && $this->level > 0) {
     foreach($this->find($thisPage)->children() as $menu): ?>
       <li<?php echo (url_start_with($menu->url)) ? ' class="current"': null; ?>><?php echo $menu->link(); ?></li>
     <?php endforeach;
   }
?>
</ul>

It’s a bit of a mess :) but I guess the thing to do is put it in a snippet, then call the snippet in the layout (it needs to be in the layout to work). It gives you a class="current" on the <li> tag when you’re anywhwere in the tree belonging to “Apples”, for example. (You’ll see what I mean!)

Hope that helps.

 

Display sidebar only if children + only display level 1 children

Hi David —

Just for clarity’s sake, “Apples”, “Oranges” and “Plums” are all level 2 in Frog, since “Fruit” is level 1, and only [Root] is level 0.

Is it only level 2 you’re after? (i.e., they will always be child pages to child-of-root pages)

 

[Sticky] Live sites running Frog CMS

@Adaron – nice sites! I’m always intrigued by the multi-lingual ones, and I see that the “Amici di Porto Pollo” one is It-En-De (almost!). What technique did you use to manage the languages?

 

Http 500 error

I use rewrite true , and i can see only the main page…

Did you remember to set:

 RewriteBase /frog/

in the .htaccess file to the correct value? (I forgot that on a recent install, and it gave me 500’s, too.)

 

Retrieve Archive Year from URL

Hi Davide —

It would be a BIG help to see the code you are using on your archiveByYear page.

I assume, from your example, that you want to get the “2009” (last four digits) of the URL. You can get that page’s year by using something like this:

echo $archive->date('%Y');

but we don’t know what variables you’re using. Does that help at all?

P.S. – You can get the INTERnet/sito_v5/it/il-gruppo/redazionali/2009 elements of your example URL by using $_SERVER['REQUEST_URI'] (FWIW)!

 

Sidebar or Submenu Navigation

You could try this:

<?php
   if (count($this->children()) > 0) {
     foreach($this->children() as $menu): ?>
       <li<?php echo (url_start_with($menu->url)) ? ' class="current"': null; ?>><?php echo $menu->link(); ?></li>
     <?php endforeach;
   }
?>

I found it easier to rearrange the <?php ... ?> tags, given the concatenation that would have been required. But I think that should do the trick for you.

 

Sidebar or Submenu Navigation

Ack! I’m an idiot! :) Of course that code is wrong. I THINK ;) this should work:

<?php
   if (count($this->children()) > 0) {
     foreach($this->children() as $menu):
       echo '<li>'.$menu->link($menu->title, ((url_start_with($menu->url)) ? ' class="current"': null)).'</li>';
     endforeach;
   }
?>

Let us know!

 

PDO without PDO

Hi Mas — if you are interested in no-PDO PDO, do you know about xPDO?