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

David posts

Feed 1493 posts

PHP "[function.require-once]: error

If you look in your config.php file, the second constant should have a value:

 define('CORE_ROOT', FROG_ROOT.'/frog');

Is that value correct? It looks like the directory to the utils.php file has dropped out…?

 

how do you ignore the parent?

Any help here?

 

Rubin - a new “minimal” theme for Frog

Hi wreford – thanks for updating the links. The original site seemed to be the target of a DOS attack of some kind, so set up the new one. There are no plans for it to disappear! ;)

 

Navigation li and child ul li dynamic output class help

In your “currently using” code, try replacing the first and third instances of

' class="current"':

with,

' class="'. $child->slug() .'"':

and replace the second instance with

' class="'. $kids->slug() .'"':

WARNING! Not tested — but it might work. ;)

 

Database same tables names

Table prefix can be chosen during install — probably preferable than forcing one on users.

 

add a graphic symbol

Adjust the <li>...</li> line to read this way:

<li><?php echo $child->link(' > '.$child->title, (url_start_with($child->url) ? ' class="navsub-current"': null)); ?></li>

That should do it.

 

Missing footer content after upgrade from 0.9.4 to 0.9.5

Hi Redcrew: Odd that it should relate to the Comments plugin. Did you notice this in the upgrade notes:

If you don’t see your old comments in the administration area, try disabling and then re-enabling the comment plugin.

You could try that … and if this site does not make use of comments, you can leave it disabled and remove whatever line of code is calling the comments_count() function. That is used only by the Comments plugin.

Hope that helps!

 

admin password retriving

Hi tr – have a look here and to the links in the posts in that thread.

 

same level menu

If I understand — see this post. Summary: have this in the sidebar:

<ul id="nav_sub">
<?php foreach ($this->find('music')->children() as $child): ?>
    <li><?php echo $child->link($child->title, (url_start_with($child->url) ? ' class="current"': null)); ?></li>
<?php endforeach; ?>
</ul>

NOT TESTED. But I hope that gets you started.

Basically, you’re finding a consistent way of calling the “music” children.

 

.htaccess

Hi jeca – you could try making a new file called .htaccess and copying the contents into it. I’ve had that renaming obstacle once or twice, and got around it that way.

 

tb_contact form using twice on one site

I’ve made an i18n version of the TB Contact Form which you can grab from here.

It might help you with your dilemma. You can make an ru-message.php file for it, and serve up the right one to the right viewers … I hope! (Note that the fr-message.php file included is for illustrative purposes only, and I hope no francophones are offended!)

This is as far as my tiny brain has got, though.

Edit – it looks like there might be an official version with i18n lurking somewhere. If Linkable sees this, perhaps he could comment?

 

Show sub-pages excerpt at parent page?

You could use this on “Main_Page”:

<?php
function nav_sitemap($parent)
{
    $out = '';
    $childs = $parent->children();
    if (count($childs) > 0)
    {
        $out = '<ul>';
        foreach ($childs as $child)
            $out .= '<li>'.$child->link().nav_sitemap($child).'</li>';
        $out.= '</ul>';
    }
    return $out;
}
?>

<div>
<ul>
<li><?php echo $this->link(); ?>
<?php echo nav_sitemap($this->find($this->slug)); ?>
</li>
</ul>
</div>

If you don’t need “Main_Page” in the list, then take out everything except the <?php echo nav_sitemap... line in the DIV at the end.

There is a lot like this you can find in the navigation guide!

 

Show sub-pages excerpt at parent page?

Try putting this code on Main_Page, zigmat:

<?php

  foreach ($this->children(array('order' => 'title ASC')) as $child): ?>

  <h3><?php echo $child->link(); ?></h3>

  <?php echo $child->content(); ?>
  <?php if ($child->hasContent('extended')) echo $child->link('Continue Reading…'); ?>

  <p><strong>Tags</strong>: <?php echo join(', ', $child->tags()); ?></p>
  <p class="info">Posted by <?php echo $child->author(); ?> on <?php echo $child->date(); ?></p>

<?php endforeach; ?>

Adjust the style/layout as you wish. (I put in most things thinking it would be easier to take them out than to add them in.) That will sort the pages alphabetically by title. If you simply want them in the order they were created, then change this line:

 foreach ($this->children(array('order' => 'title ASC')) as $child): ?>

to read like this:

 foreach ($this->children(array('order' => 'created_on ASC')) as $child): ?>

You can find a lot more about this in the docs on listing pages, or in the navigation guide.

 

installation failed: 500 Internal Server Error

You changed the name of the “Articles” page – that’s all! But you need to make some other changes if you do that. Here are the instructions.

 

Unlimited levels menu (class="current" on child only)

@skye28 – the code below only applies the “current” class as you wish. BUT, since you are styling the <li>, child pages to “current” may get its style, too. Depends on your CSS, I suppose.

<?php
function displayChildren($page, $current, $startmenu = true, $limits = null) {
  if ($limits != null && array_key_exists($page->slug, $limits)) {
    $arr = array('order' => 'position ASC, published_on DESC', 'limit' => $limits[$page->slug]);
  } else
    $arr = array('order' => 'position ASC, published_on DESC');
  if ($page && count($page->children()) > 0) {
    echo ($startmenu) ? '<ul>' : '';
    foreach($page->children($arr) as $menu) :
        // next line: if $current url matches looped url, get current class
        echo '<li'.(($menu->url() == $current->url()) ? ' class="current"': null).'>'.$menu->link($menu->title);
        displayChildren($menu, $current, true, $limits);
        echo '</li>';
    endforeach;
    echo ($startmenu) ? '</ul>' : '';
  }
}
?>
<div id="nav">
<?php
  $page = $this->find('/');
  echo '<ul>';
  echo '<li'.(in_array($page->slug, explode('/', $this->url)) ? ' class="current"': null).'>'.$page->link($page->title).'</li>';
  echo displayChildren($page, $this, false, array('obvestila' => '3', 'a-sub-page' => '1'));
  echo '</ul>';
?>
</div>

Hope that helps.

 

Unlimited levels menu (class="current" on child only)

Are you using a suffix? You could check to see that there’s nothing after the slug in the URI for the “current” class to be added … I think.

 

[Solved] Unlimited levels and children menu (bug)

Got it – thanks!

 

Misleading...

See the links in the second post of this thread – and if that is no help, you need to say more about the environment you’re using (PHP version, mySQL version, platform, etc.).

 

Archive by year problem

I set both published and created to the same dates in the past … but to no avail.

Then something has gone wrong. What you describe works perfectly for me (the 2008 entry was made this way)! :-S

 

Behaviors and Views

@jedfoster – on #4 – you could readily do this with a page-part (e.g. “homepage-promo”), and with the word “true” or “false” in it, then use the cs_children_by_part plugin (link to plugin on MadeByFrog site > Extend) to pull the correct pages, aggregated from across your site. It works. It’s even easy, once it’s set up. ;)

@stas – your “categories” sounds a lot like “tags” (see the Tagger plugin). What am I missing?

@both – future-publishing has long been on the wish-list. It would be nice to have!

 

Behaviors and Views

You may have seen these notes already, and I’m not sure how much help you’ll find there in any case — but have a look at the Google Code wiki page for ‘Behavior’.

 

Archive by year problem

@mycooluk – what date(s) did you change in the Metadata? You have the options of manually editing either or both the “created” and the “published” date. If you only changed the latter, that would explain it. The archive plugin is hard-coded to look for the “created_on” date.

So — either you need to hack the plugin code1 (not recommended :) or manually alter the “created” date in the metadata. Unless there is something else going on, of course!

1 In frog/plugins/archive/archive.php, line 124.

 

Menu links adds a '?'

@kim – where is Frog installed? if it is in the root directory (e.g., http://www.myfrogsite.com/), then in the .htaccess file, you should have a line like this:

RewriteBase /

If you have it in a subdirectory (e.g. http://www.mysite.com/cms/), then it should look like this:

RewriteBase /cms/

If that doesn’t help, see the bottom of this thread and see if that applies to your situation.

 

page part forms (custom fields)

@everflight – great sites you’ve got there. Nice work!

 

Can see CMS locally but not via http://ip.address

Ads and paid upgrades, I expect. I’ve used the free service for years (well, my venerable TestFrog site has been there 1 1/2 years, anyway!) — and the support is excellent. Bizarre, but true.