CodeIgniter Forums
Open Blog 1.0.0 released - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forum-22.html)
+--- Thread: Open Blog 1.0.0 released (/thread-14724.html)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12


Open Blog 1.0.0 released - El Forum - 03-30-2009

[eluser]kana[/eluser]
here it is:

Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
|
| These prefs are used when checking and setting modes when working
| with the file system.  The defaults are fine on servers with proper
| security, but you may wish (or even need) to change the values in
| certain environments (Apache running a separate process for each
| user, PHP under CGI with Apache suEXEC, etc.).  Octal values should
| always be used to set the mode correctly.
|
*/
define('FILE_READ_MODE', 0644);
define('FILE_WRITE_MODE', 0666);
define('DIR_READ_MODE', 0755);
define('DIR_WRITE_MODE', 0777);

/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/

define('FOPEN_READ',                             'rb');
define('FOPEN_READ_WRITE',                        'r+b');
define('FOPEN_WRITE_CREATE_DESTRUCTIVE',         'wb');    // truncates existing file data, use with care
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE',     'w+b'); // truncates existing file data, use with care
define('FOPEN_WRITE_CREATE',                     'ab');
define('FOPEN_READ_WRITE_CREATE',                 'a+b');
define('FOPEN_WRITE_CREATE_STRICT',             'xb');
define('FOPEN_READ_WRITE_CREATE_STRICT',        'x+b');


/* End of file constants.php */
/* Location: ./system/application/config/constants.php */



Open Blog 1.0.0 released - El Forum - 04-03-2009

[eluser]Kami_[/eluser]
Sorry for the late response.

I meant if you could post your index.php file located in the root folder, not the constants.php.

Anyway if it's true what you have said (that the archive is not corrupted), I don't have much clue what could be causing this problem.


Open Blog 1.0.0 released - El Forum - 04-03-2009

[eluser]kana[/eluser]
[quote author="Kami_" date="1238782662"]Sorry for the late response.
I meant if you could post your index.php file located in the root folder, not the constants.php.
.[/quote]

below is /index.php.

I do see lots of "Punto de InterogaciĆ³n Inicial" (upsidedown question marks) in BBEDIT and that the file is created with Windows line feeds...

Then I relpaced it with an /index.php from a download of CI 1.7.1, and the error is the same... so the problem must be elsewhere...

The installer worked perfectly... Is that all custom code?

thanks


Code:
<?php
/*
|---------------------------------------------------------------
| PHP ERROR REPORTING LEVEL
|---------------------------------------------------------------
|
| By default CI runs with error reporting set to ALL.  For security
| reasons you are encouraged to change this when your site goes live.
| For more info visit:  http://www.php.net/error_reporting
|
*/
    error_reporting(E_ALL);

/*
|---------------------------------------------------------------
| SYSTEM FOLDER NAME
|---------------------------------------------------------------
|
| This variable must contain the name of your "system" folder.
| Include the path if the folder is not in the same  directory
| as this file.
|
| NO TRAILING SLASH!
|
*/
    $system_folder = "system";

/*
|---------------------------------------------------------------
| APPLICATION FOLDER NAME
|---------------------------------------------------------------
|
| If you want this front controller to use a different "application"
| folder then the default one you can set its name here. The folder
| can also be renamed or relocated anywhere on your server.
| For more info please see the user guide:
| http://ellislab.com/codeigniter/user-guide/general/managing_apps.html
|
|
| NO TRAILING SLASH!
|
*/
    $application_folder = "application";

/*
|===============================================================
| END OF USER CONFIGURABLE SETTINGS
|===============================================================
*/


/*
|---------------------------------------------------------------
| SET THE SERVER PATH
|---------------------------------------------------------------
|
| Let's attempt to determine the full-server path to the "system"
| folder in order to reduce the possibility of path problems.
| Note: We only attempt this if the user hasn't specified a
| full server path.
|
*/
if (strpos($system_folder, '/') === FALSE)
{
    if (function_exists('realpath') AND @realpath(dirname(__FILE__)) !== FALSE)
    {
        $system_folder = realpath(dirname(__FILE__)).'/'.$system_folder;
    }
}
else
{
    // Swap directory separators to Unix style for consistency
    $system_folder = str_replace("\\", "/", $system_folder);
}

/*
|---------------------------------------------------------------
| DEFINE APPLICATION CONSTANTS
|---------------------------------------------------------------
|
| EXT        - The file extension.  Typically ".php"
| FCPATH    - The full server path to THIS file
| SELF        - The name of THIS file (typically "index.php)
| BASEPATH    - The full server path to the "system" folder
| APPPATH    - The full server path to the "application" folder
|
*/
define('EXT', '.'.pathinfo(__FILE__, PATHINFO_EXTENSION));
define('FCPATH', __FILE__);
define('SELF', pathinfo(__FILE__, PATHINFO_BASENAME));
define('BASEPATH', $system_folder.'/');
define('ROOTPATH', realpath(dirname(__FILE__)));

if (is_dir($application_folder))
{
    define('APPPATH', $application_folder.'/');
}
else
{
    if ($application_folder == '')
    {
        $application_folder = 'application';
    }

    define('APPPATH', BASEPATH.$application_folder.'/');
}

/*
|---------------------------------------------------------------
| LOAD THE FRONT CONTROLLER
|---------------------------------------------------------------
|
| And away we go...
|
*/

if (is_dir('install/') && file_exists('install/index.php'))
{
    header("Location: install/index.php");
    die();
}
else if (!file_exists(APPPATH.'config/config'.EXT) || !file_exists(APPPATH.'config/database'.EXT))
{
    echo '<h1>Something went wrong</h1>';
    echo '<p>Missing config files (config.php, database.php) and installer.</p>
    <strong>Please re-upload the files and run the <a href="install/index.php">installer</a>.</strong>';
}
else
{
    require_once BASEPATH.'codeigniter/CodeIgniter'.EXT;
}

/* End of file index.php */
/* Location: ./index.php */



Open Blog 1.0.0 released - El Forum - 04-04-2009

[eluser]kana[/eluser]
Ok I found the problem....

You use /application

but CI's /index.php needs to have line 43 read:

Code:
$application_folder = "/path/to/OpenBlog_1.1.0/application";

from the CI Docs (user_guide/general/managing_apps.html):

Quote:It is possible to move your application folder to a different location on your server than your system folder. To do so open your main index.php and set a full server path in the $application_folder variable.

I am running OpenBlog in a sub dir in my www root... As soon as I changed the path into "$application_folder = "/_WWW/OpenBlog_1.1.0/application" everything worked fine.

Is it an idea to add a function to the installer to ask for the full server path?


Open Blog 1.0.0 released - El Forum - 04-04-2009

[eluser]Kami_[/eluser]
So you moved your index.php file outside of the directory where application and system directories are located ?

If yes, this explains it at all.

It you leave index.php file in the same directory as application and system directory then it should work just fine (it doesn't matter if Open Blog is in www root or in a sub directory).

Anyway, glad you found the solution Smile


Open Blog 1.0.0 released - El Forum - 04-04-2009

[eluser]kana[/eluser]
[quote author="Kami_" date="1238867257"]So you moved your index.php file outside of the directory where application and system directories are located ?
)[/quote]


No I did not move anything. I just un-zipped the archive and ran the installer...

upon un-zipping the archive, the directory structure looks like this:

OpenBlog_1.1.0/
--application/
--install/
--system/
--.htaccess
--ci_license.txt
--index.php
--ob_license.txt


Is this not what you intended?


Open Blog 1.0.0 released - El Forum - 04-07-2009

[eluser]Matthew Rochow[/eluser]
Code:
<language><div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">

<h4>A PHP Error was encountered</h4>

<p>Severity: Notice</p>
<p>Message:  Undefined index:  language</p>
<p>Filename: feed/rss_posts.php</p>
<p>Line Number: 14</p>

</div></language>

This error occurs inside both RSS feeds (when viewing the source Wink)

All looks good. I have some ideas:

SEO
Quote:http://localhost/blog/blog/post/2009/01/01/welcome-to-open-blog

Let's say "welcome to open blog" is my keyphrase. /blog/post/2009/01/01/ is all unnecessary and isn't going to help it rank. If you have 10,000 backlinks you can get away with sucky URL's, if you don't you need keyword-filled URL's and keywords only.

I want site.com/the-title/ and so do most people. Switching between CMS's if need be is also made a TON easier if they use a similar convention, rather than losing all backlinks and rankings because the url's had to change, especially when the existing site is huge and 301 every old page is a months work in itself.

&lt;title&gt; should be the title of the page - right now the title is the same on every page, which is VERY bad (lets say I googled for "the rainbow pony" and in the listings a site came up which said "matthew rochow - oh yeah" with a description of "my ramblings about stuff". No-one is going to click that link, even though my post is all about rainbow ponies - because they simply can't see that my post is called "the rainbow pony" as both the title and description doesn't say that. Title definitely needs to reflect the current page (post/search/404 etc), plus for accessibility reasons. This goes for meta keywords + descriptions also.

User Friendliness
A "Archive for April 2009", "Posts marked as 'Stuff'" etc headings would be good. Perhaps this can be done in the theming side, I haven't looked into it too much...

Admin
A WYSIWYG/HTML toggle like Wordpress does (except true HTML, not a"yeah you can enter what you want, but I'll mess with it anyway so you might as well just be using the WYSIWYG" html mode that WP uses. I hate WYSIWYG, however for guest bloggers and the like (using the same blog) they more than likely need it... having it 100% on or 100% off isn't preferred.

Having the dashboard icons included in the link would be great, makes it a lot bigger target to hit.

Comments disabled (put into moderation) setting, otherwise people who spam comments will have them displayed for however long until they're finally spotted and deleted. I'd prefer to manually approve comments, however someone who gets hundreds of comments a post could prefer them getting instantly approved.

"Posts per site" - is this "posts per page"?
"Links per box" - no idea what this is. Maybe a little (?) icon which can have detailed tooltips.

These would be cool
- Mobile template. Easy to do, just use any free mobile detect function, and if its a mobile go to /mobile/ and use that template instead of the default one.
- Image manager. Rather than having to upload to somewhere else and then enter the URL (heck, half my clients don't even know what a URL is! Smile) Makes life WAY easier!

Seriously though, it's really great and I like it a lot. Some people are born perfectionists and simply must pay attention to the smallest of details Smile


Open Blog 1.0.0 released - El Forum - 04-07-2009

[eluser]Kami_[/eluser]
Yes, it should work fine like this.

I'll look deeper into this problem, but I installed Open Blog in sub directory on several different servers and I didn't have any problems.

[quote author="kana" date="1238886589"][quote author="Kami_" date="1238867257"]So you moved your index.php file outside of the directory where application and system directories are located ?
)[/quote]


No I did not move anything. I just un-zipped the archive and ran the installer...

upon un-zipping the archive, the directory structure looks like this:

OpenBlog_1.1.0/
--application/
--install/
--system/
--.htaccess
--ci_license.txt
--index.php
--ob_license.txt


Is this not what you intended?[/quote]

[quote author="Matthew Rochow" date="1239105453"]
Code:
<language><div style="border:1px solid #990000;padding-left:20px;margin:0 0 10px 0;">

<h4>A PHP Error was encountered</h4>

<p>Severity: Notice</p>
<p>Message:  Undefined index:  language</p>
<p>Filename: feed/rss_posts.php</p>
<p>Line Number: 14</p>

</div></language>

This error occurs inside both RSS feeds (when viewing the source Wink)

All looks good. I have some ideas:

SEO
Quote:http://localhost/blog/blog/post/2009/01/01/welcome-to-open-blog

Let's say "welcome to open blog" is my keyphrase. /blog/post/2009/01/01/ is all unnecessary and isn't going to help it rank. If you have 10,000 backlinks you can get away with sucky URL's, if you don't you need keyword-filled URL's and keywords only.

I want site.com/the-title/ and so do most people. Switching between CMS's if need be is also made a TON easier if they use a similar convention, rather than losing all backlinks and rankings because the url's had to change, especially when the existing site is huge and 301 every old page is a months work in itself.

&lt;title&gt; should be the title of the page - right now the title is the same on every page, which is VERY bad (lets say I googled for "the rainbow pony" and in the listings a site came up which said "matthew rochow - oh yeah" with a description of "my ramblings about stuff". No-one is going to click that link, even though my post is all about rainbow ponies - because they simply can't see that my post is called "the rainbow pony" as both the title and description doesn't say that. Title definitely needs to reflect the current page (post/search/404 etc), plus for accessibility reasons. This goes for meta keywords + descriptions also.

User Friendliness
A "Archive for April 2009", "Posts marked as 'Stuff'" etc headings would be good. Perhaps this can be done in the theming side, I haven't looked into it too much...

Admin
A WYSIWYG/HTML toggle like Wordpress does (except true HTML, not a"yeah you can enter what you want, but I'll mess with it anyway so you might as well just be using the WYSIWYG" html mode that WP uses. I hate WYSIWYG, however for guest bloggers and the like (using the same blog) they more than likely need it... having it 100% on or 100% off isn't preferred.

Having the dashboard icons included in the link would be great, makes it a lot bigger target to hit.

Comments disabled (put into moderation) setting, otherwise people who spam comments will have them displayed for however long until they're finally spotted and deleted. I'd prefer to manually approve comments, however someone who gets hundreds of comments a post could prefer them getting instantly approved.

"Posts per site" - is this "posts per page"?
"Links per box" - no idea what this is. Maybe a little (?) icon which can have detailed tooltips.

These would be cool
- Mobile template. Easy to do, just use any free mobile detect function, and if its a mobile go to /mobile/ and use that template instead of the default one.
- Image manager. Rather than having to upload to somewhere else and then enter the URL (heck, half my clients don't even know what a URL is! Smile) Makes life WAY easier!

Seriously though, it's really great and I like it a lot. Some people are born perfectionists and simply must pay attention to the smallest of details Smile[/quote]

Hello,

First of all, thank you for the bug report and all the suggestions.

1. Post URL

If the post URL wouldn't contain the date (year/month/day) and you would have two posts with the same title, script wouldn't know which one to show.

I could minimize it to /year/month/date/post-title, but that is the most I can do (well, maybe I could make that user can choose custom URL route for every post, but I don't think this is very user friendly).

2. User Friendliness

Don't understand completely what you mean, but if the tags are what you are looking for, they will be available in the next release Smile

3. Admin

3.1 WYSIWYG editor already contains a little icon named "html" which you can click to edit the code manually.

3.2 Thanks, I will update the translation.

3.3 Tool tips are already finished and will included in the next release.

4. Other

Same goes for the mobile / PDA and iPhone version of the blog - it's already done and it will be included in the next release (yes, it includes auto detection of the user agent) Smile

Image manger is definitely a must but I can't promise it will be already available in the next release.

My current priority is finishing this release (Open Blog 1.2.0) and releasing it around May.

The next big priority after Open Blog 1.2.0 is the documentation (wiki), so some bigger features like image manager and plugins / widgets will be put on hold until the documentation is finished.


Open Blog 1.0.0 released - El Forum - 04-07-2009

[eluser]Matthew Rochow[/eluser]
If you look at WP, you either enter your own URL, or it custom makes it (the-post-title). If it's already taken, it'll slap a 2 on the end. If you don't like the-post-title2 you can change it to post-title or something that basically means the same thing (yet is unique)... and if you don't know what you're doing, you wouldn't even know why you need URL's, or that you can even edit them anyway Smile How many times are people to blog about the exact same thing with the exact same title (without having it in parts anyway)? So rare it wouldn't affect much.

Go to a archive page in WP... it has the title of the page <h1>, then the posts. So you know "ok I'm viewing the posts in March 08" for instance. Example: http://wp-themes.com/?cat=6

Image manager, from my experience, is a pain... there's tinyMCE plugins but I couldn't get them to work properly, there were bugs all through them.

EDIT: And setting up a mailing list for updates is great too, that way people get instantly informed when a new version is released (unless you can somehow code that into the script... phplist or similar would be heaps easier) Smile


Open Blog 1.0.0 released - El Forum - 04-07-2009

[eluser]ray73864[/eluser]
fckeditor has a much better image manager in it, i used to use TinyMCE but then got annoyed with how difficult it was to use and get to function how you want it to.