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

Craig posts

Feed 76 posts

.htaccess

On a Mac, you would probably do this:

mv _.htaccess .htaccess
 

.htaccess

Try removing (or just commenting-out, with a # symbol) the first line – the php_flag… bit, and see if that makes a difference.

If it’s a Unix/Linux server, sometimes they require the .htaccess file has appropriate permissions applied – usually ‘755’, or rwxr-xr-x. Something else to check too :)

 

.htaccess

Hi cormac

The 500 Internal Server Error can happen due to certain incompatible entries in your .htaccess file. Are you able to post the contents of yours here for us to look at?

 

Listing files

No problem :)

 

Listing files

Hi joeydi

I think it could be to do with you setting the $dir variable to URL_PUBLIC (which is the http://… address to the site, not the filesystem directory). What you probably need is FROG_ROOT instead.

 

[Sticky] Live sites running Frog CMS

@vh: Great work on the layout – it’s really good! :)

 

Need to go a step beyond: Determine whether page content exists or not

I didn’t know that, sorry. Learn something new every day :)

 

Need to go a step beyond: Determine whether page content exists or not

The hasContent() method only checks if the page part is defined – not if it actually has any content in it.

The best and quickest method is to remove the part if there is no content. Otherwise; I would do:

<?php if($this->hasContent('link') && !empty($this->content('link')): ?>

That checks for presence of the part, and will then only process more code if the part is not empty.

 

Showing the current page by adding a current class to the navigation

Are you using the Frog PHP functions to generate your menu? If so, this thread might help.

 

Funky Cache (beta testers wanted)

@tuupola: Sorry; it does work! Because my Frog URL suffix was empty; I thought the Funky Cache plugin suffix also had to be empty – which didn’t work. An empty Frog suffix and a .html Funky Cache suffix works as expected :)

 

Funky Cache (beta testers wanted)

Hehe. Thanks philippe. Forgot about that ;)

 

Funky Cache (beta testers wanted)

I’ve been working a bit on trying to get this plugin to work properly when you configure Frog without a page suffix.

The way I intend to do this is to create the folder structure, with an index.html page to hold the page content.

Example:

  • /articles/ -> /cache/articles/index.html
  • /projects/test/ -> /cache/projects/test/index.html

I started out doing this with a Frog setup in a subdirectory; but due to the way Apache/htaccess handles the REQUEST_URI/REQUEST_FILENAME – I don’t think it’s possible for it to distinguish between the directory that Frog is installed at and the URL of Frog’s page/subpage you want.

I have it slightly working – domain root (not subdirectory) with basic pages and no plugins. The code expects that there is no URL suffix – i.e. it is likely not to work with it set to .html.

Files

New models/FunkyCachePage.php

Link

Htaccess

# Rewrite to check for cached page.
#RewriteCond %{REQUEST_METHOD} ^GET$
RewriteCond %{DOCUMENT_ROOT}/cache/%{REQUEST_URI}/index.html -f
RewriteRule ^(.*)$ /cache/$1/index.html [L,QSA]

The above entries should go between Frog’s admin rule and the main Frog rule.

 

Changing 'public' folder functionality

Porting from vanilla static pages to any CMS will involve some manual work to change paths – there is no escaping that.

 

Changing 'public' folder functionality

Yes, although it’s not Frog CMS specific. There’s an HTML tag you can add to your layout.

Add a BASE tag (within the HEAD) to your layout, and set the path for all auxiliary files such as CSS and images, like this:

<head>
...
<base href="<?php echo URL_PUBLIC ?>public/" />
<link href="css/foobar.css" rel="stylesheet" />
...
</head>
<body>
<img src="images/foobar.jpg" />
</body>
 

How to set a home subpage as default homepage

It looks like you’re using htaccess with mod_rewrite already; so what you should be able to is this:

RewriteRule ^$ index.php?PAGE=subpage [L,QSA]

Place it in your .htaccess file before the existing Frog CMS definitions.

It will not change the actual URL in the address bar to subpage.htm (you can’t without a redirect) but it will load the subpage.html page.

 

Newsletter Plugin Help

When transferring files via FTP, it’s wise to check that the transfer type is set correctly for the relevant file type. Images should be transferred as binary, and PHP/HTML/CSS/JS files should be transferred as ASCII. Sometimes clients can get this wrong – causing unexpected results.

 

add js file to plugin files only?

I’m not sure if this is possible.

However, if you’re able to modify your Javascript file to conditionally process the code based on the URL, then this might be useful:

How To Get URL Parts in JavaScript

 

Article dates not showing up - fresh install

Just use the PHP date function. Like this:

date('j F Y', strtotime($article->created_on));

The forum is what the community make of it. Frog does not employ anyone to constantly monitor the forum for posts, so it relies on the free time of its members; who may or may not have jobs and families etc :)

 

Article dates not showing up - fresh install

Hi uggi, I think you need to use this instead of date():

$article->created_on;
 

[Sticky] Live sites running Frog CMS

Finally put a new layout on my own personal FrogCMS site: Craig Rodway – things I’ve said and made.

Makes use of snippets, Textile, tagger and page metadata plugins. Might add some image/photo things soon and to link it with my Flickr stuff :)

 

New Frog CMS User: Simple Question

Hi modernlics.

The sidebar part is inherited from it’s parent page. If you want a separate sidebar for that page, just add a new part called ‘sidebar’ on the About Us page in the admin area.

There’s some information about this on the documentation part of the website :)

 

Changing URL_PUBLIC after the fact

I would check the path settings in your Layout that references the stylesheets to see if it is still looking in the /demo/ folder or something.

One thing I do on all my websites is to use the BASE tag (within the HEAD) to set the path for all auxiliary files such as CSS and images, like this:

<head>
...
<base href="<?php echo URL_PUBLIC ?>public/" />
<link href="css/foobar.css" rel="stylesheet" />
...
</head>
<body>
<img src="images/foobar.jpg" />
</body>

This way, the only paths you need in your pages are all relative to your ./public/ directory, and changes to the main URL will be straight-forward.

 

Articles

Articles are sub-pages of the “Articles” page – so modifying, adding and removing is the same procedure for other pages within the site. Eg, clicking the title to edit; click the (+) icon next to Articles to add; or the Trash icon next to an article to delete it.

 

Display tags?

Is this any good?

echo preg_replace('/,/g', '<br />', tag_links($this->tags()));

I’m not sure what the output is of tag_links() so I’m just guessing here :)

 

Basic Plugin to see and edit records in a database table

Ok. Try a bit of debugging… work from the start :)

Try this just after the $requests = line.

die(print_r($requests));

Then load the page.

Another option – try setting $requests = array(); (instead of Record::findAllFrom…) and see if the sidebar loads.