Giter VIP home page Giter VIP logo

phile's People

Contributors

denbeke avatar frodox avatar infostreams avatar james2doyle avatar kicken avatar marado avatar mikeschinkel avatar neoblack avatar noisek avatar pschmitt avatar quasipickle avatar schlaefer avatar sonyarianto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phile's Issues

Colons stripped from meta

Colons appear to be stripped from meta attributes. For instance, I have:

/* Title: Link Roundup: John Jaso's new mask and more
Author: Jason Wojciechowski
Date: 2014/2/20, 8:22 PM */

The page displays like this. Note the lack of colon in the title and in the time.

Further, the stripping of the colon from the time in the Date means that I get a fatal error when I try to use the formatted date option from config.php:

[22-Feb-2014 20:10:05 America/Denver] PHP Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): Failed to parse time string (2014/2/20, 822 PM) at position 11 (8): Unexpected character' in /home3/beanebal/public_html/philes/vendor/twig/twig/lib/Twig/Extension/Core.php:523
Stack trace:
#0 /home3/beanebal/public_html/philes/vendor/twig/twig/lib/Twig/Extension/Core.php(523): DateTime->__construct('2014/2/20, 822 ...', Object(DateTimeZone))
#1 /home3/beanebal/public_html/philes/vendor/twig/twig/lib/Twig/Extension/Core.php(457): twig_date_converter(Object(Twig_Environment), '2014/2/20, 822 ...', NULL)
#2 /home3/beanebal/public_html/philes/vendor/twig/twig/lib/Twig/Environment.php(331) : eval()'d code(130): twig_date_format_filter(Object(Twig_Environment), '2014/2/20, 822 ...', 'F j, Y')
#3 /home3/beanebal/public_html/philes/vendor/twig/twig/lib/Twig/Template.php(276): __TwigTemplate_3b85cf0f7d38f8958e2e5745ab3fc8cfdeddf5e6eaa9bd3f92296c0fedecde77->doDisplay(Array, Array)
#4 /home3/beanebal/public_html/philes/vendor/twig/twig/lib/Twig/Templ in /home3/beanebal/public_html/philes/vendor/twig/twig/lib/Twig/Template.php on line 291

[FEATURE] Multilingual Website

Hi everyone, hope everything is fine for you !
While finalizing my website I'm thinking why not publish it in French too, but how would I integrate this in Phile...
I was thinking something like this

Create language's named folder 'en' 'fr' 'de' 'it' 'es' in the content folder, and adding something like:
<html lang="{{ meta.lang }}">

Defining the default language in the config.php

Before any page is loaded it check if the user (IP, because I don't want my viewers to register) already selected a language | else > try to guess | else > default_language

Provide on each page the possibility to change the language

I'm no web developer but I think that would be the easiest, fastest way to do it no ?

Would you integrate this in Phile ? or make a plugin ? Please :)

Thanks

is_front_page doesn't seem to work

I can't get is_front_page to work.

{% if is_front_page %}
  something
{% endif %}

and

{{ is_front_page }}

give nothing.

I've grepped is_front_page in Phile folder and no result, unlike Pico.
Has it been removed ?

[TASK] use composer for PhpFastCache

Currently we are including the phpfastcache lib via a require when we could use the composers autoloading features. This would simplify the plugin greatly.

Phile and live-editing

When I leave the editor (usually VIm) open, I cannot view the pages (on localhost) - got a WSOD. I don't know whether this is an expected behavior, but I found it rather annoying because I've then to close the editor (and so cannot undo some operations anymore when the result is not what I wanted).

I suspect it's because some editors create a backup file (.swp, .md~, ...), Pico has integrated the feature to ignore those backup files, is it possible to do the same with Phile? Or is this expected behavior?

Call sub object of {{ page }}

Hi,

While Pico seemed a good idae at first, it is unusable for my project because it is impossible to call a sub object of {{ page }}.

I'd like to be able to loop thought all the page in a specific folder, something like

{% for page in pages.myfolder %}

Or in other words, if the current page is http://mysite.com/myfolder, is it possible for Phile to loop in all the pages inside that folder ?

Thanks

Possible bug with tables

I have a small table in one of my .md files like this -

Date Launch Site Destination Type of Paddle Distance (nm)
2013-08-11 Amherst Coal Island Circumnavigation 6.50
Content Cell Content Cell Content Cell Content Cell Content Cell

It's not rendering in the browser properly. It's rendering like this --

 **Date**   | **Launch Site**  | **Destination**   |   **Type of Paddle**    | **Distance (nm)** |

:------------:| :--------------: | :--------------: | :-------------------: | :-------------: | 2013-08-11 | Amherst | Coal Island | Circumnavigation | 6.50 | Content Cell | Content Cell | Content Cell | Content Cell | Content Cell 

Please give it a try.

[FEATURE] Meta blocks as HTML comments

I really like the ideas behind pico and Phile and the exciting thing for me is that with a file based content management system that uses markdown, the system is not important.

This is great flexibility it means any markdown editor can be used and should mean that it is easy for people to switch between pico and Phile and other systems that may come int the future.

This idea will only work if the markdown that is used is standard and the meta tags become standardised.

As such I would like to propose that the format for Phile markdown is changed to use standard HTML comments to protect the meta section.

Instead of :

/*
title: Title
*/

We would use:

<!--
title: Title
-->

This would mean previews in most markdown editors would ignore the meta section.

I think we should create a plugin that recognises the old format but make the core use the standard format and all examples use the new format.

What do you think, shall we take this opportunity now while there is not much markdown content created?

Intro (not an issue)

Hello, all.

I am new to GitHub, so excuse me if I am doing this wrong, but here goes:

As some of you already know, I have arrived here via an impression that Pico may or may not be continuing, which resulted in someone inviting me to give Phile a go. I see it is very new indeed!

By way of introduction: my name is John Snippe, and I've been messing around with the whole interweb thing since the mid-90's (software tester, blahblahblah)... but have never become what I would characterize as a true coder. I know HTML, and enough PHP to get myself into trouble, but not really much more.

Having said that: I'd like to help. Not really sure what I can contribute given my skill-set, but I'm certainly willing. I suppose the first step would be to become more conversant on the nuances of GitHub.. but beyond that, any suggestions on how I can contribute (beyond throwing out an avalanche of ideas)?

[BUG] Double slash in current_page.url for root-index page

trouble

For index.md page in root-cms folder the variable {{ current_page.url }} is //index. (i.e. on URL http://site.com/ )

Expected value : /index.

proof?

look source-code of http://ohdoylerules.com/ and http://bitthinker.com/blog/ in head section

ideas?

I just look at file Model/Page.php, it looks like smth wrong :D
I add debug output into __construct, so code looks like:

Event::triggerEvent('after_load_content', array('filePath' => &$this->filePath, 'rawData' => $this->rawData, 'page' => &$this));
echo "content dir: " . CONTENT_DIR . " , path: " . $this->filePath . "<br>";

$this->url  = str_replace(CONTENT_DIR, '', $this->filePath);
echo " 1 - $this->url" . "<br>";
$this->url  = str_replace(CONTENT_EXT, '', $this->url);
echo " 2 - $this->url" . "<br>";

$this->url  = str_replace(DIRECTORY_SEPARATOR, '/', $this->url);
echo " 3 - $this->url" . "<br>";

if (strpos($this->url, '/') === 0) {
    $this->url = substr($this->url, 1);
    echo " 4 - $this->url" . "<br>";
}
echo "<hr>";

$this->parser   = ServiceLocator::getService('Phile_Parser');

And all is fine.. except root-index file. So, browser-output will be:

content dir: /var/www/bt/www/blog/content/ , 
path: /var/www/bt/www/blog/content////index.md
1 - ///index.md
2 - ///index
3 - ///index
4 - //index
------------------------------------------------------------------------
content dir: /var/www/bt/www/blog/content/ , 
path: /var/www/bt/www/blog/content/index.md
1 - index.md
2 - index
3 - index
------------------------------------------------------------------------
content dir: /var/www/bt/www/blog/content/ , 
path: /var/www/bt/www/blog/content/archive.md
1 - archive.md
2 - archive
3 - archive
... fine articles ...

Site root-dir on my localhost is /var/www/bt/www/, so double index -page is quite interesting...

[Suggestion] Closing Issues ~ slow it down?

Can I suggest that issues not get closed by any other than the initiator for at least 48 hours after a 'solution'' has been offered by the group? In other words... just because someone offers a solution, that might not actually solve the problem, and for the submitter of the solution to close the thread does nobody any favours.

Besides... what's the hurry?

Actualize basic docs

It's just a note for you, dont forget to actualize a basic doc

I just start to migrate from Pico :D and.. I've found a doc-mismatch.

For example, I can't use {{ page.date_formatted }} as noted here , so I should rewrite my theme to use {{ page.meta.date|date(config.date_format) }} instead. I think, it's good to collect all API-changes in one place :)

I even can make a PR, if you help me with information :)

[FEATURE] WSOD on installing Phile in localhost

I'm comparing Pico with Phile, but the only thing I get here is a blank page (White Screen of Death) :-/ . It seems there are no docs providing on how to install it that didn't help me either with this issue.

I've done it as my intuition would do it:

$ cd /var/www/
$ git clone https://github.com/PhileCMS/Phile.git

Then I would expect that localhost/Phile would give me access to the site, but nope, blank page..

Did I miss something?

Rename before_twig_register

Twig is registered on autoload when using composer. Making this event a misnomer.

Possible new names:

  • before_twig_init
  • before_template_register
  • before_twig_loaded

[FEATURE] Menu sorting by Meta value

Please consider adding sorting by some sort of meta value at the top of every page. When I used Pico I sorted by the date field by just using numbers in that field, 1,2,3. I don't know why it worked when it was supposed to be using the date but it did. Maybe it still does in Phile but a better method is using a meta value to sort in any order a user wants.

[Suggestion] Phile ~ the business model

Not sure this is the appropriate place or venue to ask this, but I'm not sure what would be, so here I go. Coming from a business background, I guess I am used to taking hard looks at things.. and ATM I am looking at the 'business model' of Phile.

Given that 'blog' isn't currently a default reality of Phile leads me to ask the question: what is the base demographic this app is after? What is it's real purpose?

My assumption (perhaps incorrect) is that blogging would be integral to a majority of those who would be interested in using Phile on an ongoing basis. If that is the case, should it not be somehow embedded in the core of the app? Note that I am possibly using the word 'core' in a context that might not be normal here... I have read a great deal about 'core' here already, and I am not sure I mean the same thing. What I mean is: IMO the ability to blog should be either default, or enabled by a simple true/false toggle in the config file.

I appreciate that this will increase the code-base for the app... but if we define the userbase as generally wanting blogging when considering Phile, it probably isn't 'bloat', per se.

Am I way off-base here?

Pagination

Something we never really discussed. But my blog is getting close to 100 articles on a single page. I would like to split them.

I was thinking something like example.com/2 would load the second chunk of pages based on $config["posts_per_page"] or a similar style.

So I am thinking of building a plugin for this. Does anyone have any conventions before I start?

[BUG] Using a querystring on the uri

If I use a querystring on the uri I get a 404. i.e.

somevalidpagename?somevar=somevalue

results in 404. I use this is some plugins. Any work around?

Fatal Error regarding hash.

For starters, on a dev env with xampp everything works just nicely except %base_url% not working, but that isnt the point here.

On my server i get this error message on a mint install.

Fatal error: Call to undefined function hash() in /vendor/twig/twig/lib/Twig/Environment.php on line 273

I am running PHP 5.4.5 and i have activated hash.so in the php file. httdaemon is nginx running OpenWRT.

Pico is running flawlessly, but for people knowing what OpenWRT is, they will understand performance is prio!

Using $this when not in object context in

I try to use phileTwigFilters , limit_words filter, but it returns an error:

Fatal error: Using $this when not in object context in   

/.../phile/plugins/phileTwigFilters/plugin.php on line 25

line 25: return trim(substr($string, 0, $pos[$this->settings['limit']])) . '...';


Actually, it there any way to modify meta-data of page depend on parsed content?
I didn't find any appropriate event, and the twig filter does not want to work too :D

I want to port my Pico Custom Post Preview Plugin...

[Question] Rating System

Hi everyone,
Again, love the project and the work you're doing !
As you know I'm not a good web-developer (only '[objective-c]' ;), I'm actually making a video player plugin, but I'm having some issue with the rating system...

Phile working with no SQL/MySQL... I would like to keep it that way, but I don't think it would be performant to use a XML file as a DB, am I wrong ?

How & Where would you store the data ? How would you manage the check if the user already 'vote' ?

Thanks a lot for your work, You have all my support !
(In the futur, when I'll get the time, I would like to make a 'Free' Mac App to build an easy&fast website using Phile and use this app as an 'Admin Panel' to manage websites)

phileAdmin

Here is the plugin I have been working on for the past month.

https://github.com/james2doyle/phileAdmin

I am inviting these people to check it out formally, because they are plugin writers and power users.

@NeoBlack
@pschmitt
@Jecomire
@jacmgr
@TomPichaud
@bzerangue

This is on my repo because I don't think it is ready for a Phile community plugin. Also I didn't want new people coming to Phile installing it and complaining about how it doesn't work properly.

I posted this as an issue because then the watchers of the repo will see it. I want people to check it out. I'm looking for feedback on how this can move forward. Although the code is actually almost finished, there are features that don't work yet.

So install it and take it for a spin.

I don't want to inundate this repo with issue comments. So all feedback can be placed in the phileAdmin repository on this first issue.

Thanks.

{{ current_page.url }} - Not working

Hi,
Love your project, over pico ! But I would like more documentation about how to write our own plugins please...
While using pico I was already experimenting some issue with {{ current_page.url }} picocms/Pico#104

And with Phile, {{ current_page.url }} just doesn't work.

Any idea ?

By the way, I don't know if it's only my server but to get Phile (or Pico) working properly I had to change the .htaccess by adding this line:

RewriteBase /

And config.php

// $config['timezone'] = 'Europe/Brussels'; // I still have the time_zone php warning if I use this to make it disappear I must had this :
date_default_timezone_set('Europe/Brussels');

[TASK] version bump?

We should probably bump up the version since the following have been added since the last bump.

  • EncryptionUtilities
  • MetaSorting

[FEATURE] YAML Frontmatter Plugin for Meta data and for making it easier for users other systems to migrate to PhileCMS?

I don't mean to cause trouble, but would love to see a YAML Frontmatter option for meta. I know this was discussed in an earlier issue, and it was decided that YAML Frontmatter for meta doesn't add a specific benefit to Phile.

But, if there was a plugin that allowed for YAML frontmatter, I think this would be great gateway... of getting some of those Jekyll, Middleman, Nanoc, or Statamic folks to consider PhileCMS. They would haven't have to change their content files since those systems use YAML Frontmatter. It would make migration for those coming to Phile much easier.

It's just a thought, but I think it would be a gateway for those non-developer types to jump in and start using Phile with minimal effort and not having to change their content files to HTML or CSS style comments for meta... but they could use their existing YAML frontmatter as meta.

Unfortunately, my PHP skills are horrific or I would try to tackle this myself.

Thanks for your time and for pulling together this superfast and brilliant CMS.

Which version to use

Didn't know where to ask this but should we be using the "master" or the latest "release" version? Is the "master" unstable generally?

[FEATURE] sourcing md files

My site has a lot of text blocks that are used over and over again on several pages. Is there a way to include markdown from a file? That file would be a page itself unless its name starts with a dot. Avoiding loops could be left to the user.

[FEATURE] Use multiple meta fields for sorting pages

the sorting of pages should be possible by multiple meta fields.

e.g.

´$config['pages_order_by']='meta:date,meta:title'´

this will sort the pages first by date and as second criteria by title.

See also the discussion in issue #46

Hash links to root instead of current page

Say you're on a page example.com/folder/page and you link to #test-id.
Instead of scrolling to the top of test-id as expected, it points to example.com/#test-id

I can't for the life of me work out why this is. I thought it might just be something up with my install, but I've just been to http://ohdoylerules.com/personal-project/vim-svg and changed a random link in dev tools to point to #disqus_thread and it goes straight to http://ohdoylerules.com/#disqus_thread

Custom meta for $config['pages_order_by']

Hi all,

It would be great to be able to choose the meta responsible for pages_order.

Take a menu whose items are generated with Phile. The only way to have control on ordering is to enable order_by_date (obviously using Title just for this purpose would be a bad idea).

This ends up with several .md files with the Date meta, where Position would have made more sense. This is more than cosmetics because you can remove one line of code in each page if your meta is also used for something else.

Is it something that would be easy to do ?

Thanks

%base_url% not working.

After this issue which was a "user error" imo, #23

No references for %base_url% is working, thought it was some kind of incompatibility from pico, but apparently not.

It only prints the raw tag.

Get arrays of page or meta data

I have several pico plugins I am trying to convert to phile. The plugins use ARRAYS for the twig_vars, $pages, $meta, etc... Phile is using objects for these data. Is there some way to get these as arrays instead of objects, so I could easily convert plugins to work in phile? I need an array of all meta for any $page object. Any suggestions, I am not too good at OOP yet?

\Phile\Utility::getBaseUrl() return full URL

I write a plugin fot Phile, and I need a site base url (i.e. site.com ).
Since I haven't access to $config['base_url'], I tried \Phile\Utility::getBaseUrl();,
but it returns a full page url (line #41,

return rtrim(str_replace($url, '', $protocol . "://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']), '/');

Actually, why? :)

Of course, I can do it somehow by myself from $_SERVER[...'], but maybe it's not a feature, but a bug? :)

Using after_load_content to change content

I am tryng to change the content on a specific page. I use

..execute in plugin only when uri is my desired uri....

if ($eventKey == 'after_load_content') {
      $data['page']->setContent()  = 'xxxxxxx  my special content xxxxxxxxxxx';
}

I get error message
Fatal error: Cannot use object of type Phile\Model\Page as array in C:\xampp.......

I don't want to redirect, just want to completely resubstitute the content and continue standard processing from the after_load_content event.

Any suggestions, may need to use the before_parse_content?

Blog?

Is there a timeline / ETA on when Phile might be blog-enabled?

[QUESTION] Sorting pages

I have the following snippet in my config.php:

$config['date_format'] = 'j F Y';
$config['pages_order_by'] = 'date';
$config['pages_order'] = 'desc';

And the following meta tags were applied:

<!--
Title: file1
Date: 17 December 2013
-->
<!--
Title: file2
Date: 24 December 2013
-->
<!--
Title: file3
Date: 10 February 2014
-->

So, the files should appear in the following precedence: file3, file2, file1. However, I got file2, file1, file3. It seems that the sorting doesn't take the years into account, or did I do something wrong?

Documentation/installation not clear

Hi,

i finally installed Phile but i was near dropping it down because i got problem during installing. Hope that helps other and maybe a clearer installation process.

Ok so the first thing i've done is to unpack Phile and try to run http://myserver/path/phile/ and so i've got an error http://myserver/path/phile/setup not found, even if i've activated apache mod_rewrite.

It was not clear that one has to change $config['encryptionKey'] in config.php. I finally got to a page with http://myserver/path/phile/index.php that redirected successfully to http://myserver/path/phile/index.php/setup but not dispaying the setup.md page. So i've figured i has to set up an encryption key by manually opening the setup.md file.

Why not including a .htaccess file to redirect urls to index.php ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.