pe_pplog v2.1b bufixes!

Browsers, email, chat, etc.
Message
Author
Dromeno
Posts: 534
Joined: Fri 12 Sep 2008, 07:01

Working now!

#31 Post by Dromeno »

YES! Thanks again efiabruni! :D :lol:

Hopefully I have the time this weekend to play a bit more with different pplog templates.

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

cool!

#32 Post by efiabruni »

Glad I could help :) There are now pet packages available for the blog (see first post) so there is no need anymore for changing file paths or setting permissions. I also tested in in Carolina and Saluki, but would be grateful for feedback on how it works in other derivatives.

Dromeno
Posts: 534
Joined: Fri 12 Sep 2008, 07:01

pagekite

#33 Post by Dromeno »

Thanks thanks thanks... Pet works indeed (Carolina). It would be great if you (or somebody else) could make a pagekite pet as well. Last year I used Opera Unite for these kind of things, but they dropped the project.

Of course Opera is not open source either, so not the first choice, but so far they have been producing great tools.

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

bugfix version

#34 Post by efiabruni »

There is now a bugfix version (2b) available of the blog, see the first post.

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

new css theme

#35 Post by efiabruni »

I made a new css theme for the blog (darkgrey).

updated 23.11.13 to work with the new css based lightboxes/gallery
Attachments
darkgrey.css.gz
(1.51 KiB) Downloaded 421 times
darkgrey.png
(152.38 KiB) Downloaded 458 times
Last edited by efiabruni on Sat 23 Nov 2013, 19:00, edited 1 time in total.

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

pets for precise and slacko

#36 Post by efiabruni »

I tested the pets for Precise 2.7.1 and Slacko 5.6 and they are not only working fine, but also do not overwrite the inbuilt PPLOG files.

There is also a new theme, with the menu on the bottom of the page:

updated css file 23.11.13 to work with the new css based gallery/lightboxes
Attachments
plain.css.gz
(1.5 KiB) Downloaded 397 times
Screenshot.png
(87.52 KiB) Downloaded 412 times
Last edited by efiabruni on Sat 23 Nov 2013, 18:59, edited 1 time in total.

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

Upload page

#37 Post by efiabruni »

This is a plugin for the admin page of the blog, a simple upload page. Multiple file uploads are supported in modern browsers, otherwise it is only simple file upload.

The following variables have to be added to pe_Config.pl:

Code: Select all

our @config_uploadFolders = qw(/images /css);
Folder you want to upload to, the script will recognise subfolders and add them automatically (eg, for /images, /images/photos and /images/photos/thums would be added on the upload page to choose from)

Code: Select all

our @config_allowedMime = qw(image/ text/css text/html text/plain);
Allowed mime types, if no file extension is given all for this mime type can be used. As in this example all image files (png, gif, jpg etc.) can be used, but for text files only css, html and plain text files)

For localisation add the highlighted to the language you are using:

our %locale;

$locale {"EN"} = {
upload=>"Upload File",
...
}

in case the pe_pplog version without localisation is used add:

Code: Select all

our $lang = "EN";
our $locale{$lang} = {upload => "Upload File"};
Plugin:
Attachments
upload.pl.gz
(1.56 KiB) Downloaded 421 times

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

choose locale and choose style option

#38 Post by efiabruni »

This is a diff file for the v2b of the pe_pplog to add a chose style and/or choose language option. A cookie is set to remember the choice.

I had added this to the demo page of the pe_pplog, but do not want to add it as a regular feature.
Attachments
selection.diff.gz
(872 Bytes) Downloaded 435 times

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

Adding a calendar

#39 Post by efiabruni »

Adding a calendar to the pe_pplog is quite easy, you can find a how-to here.

Using the same JQuery plugin I also wrote a new archive script replacing the old one with a calendar with click-able links.

Follow the instructions in the post in the link, or use the attached diff file.

The JQuery plugin (not by me) can be downloaded here. Place the files in the /js folder on your server.
Copy and paste the following to "our $config_customHTMLhead" and "our $config_customHTMLadmin" :

Code: Select all

<link rel="stylesheet" type="text/css" href="/js/fullcalendar.css" />
<script type="text/javascript" src="/js/fullcalendar.js"></script>
Attachments
archive_sub.diff.gz
diff file for sub.pl to add a calendar based archive
(1.44 KiB) Downloaded 435 times
cal-archive.png
calendar based archive example
(81.08 KiB) Downloaded 460 times

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#40 Post by smokey01 »

efiabruni I have your lovely pe_pplog.pl working very nicely locally using localhost on my desktop computer.

My next challenge is to upload it to my web site so others can also access it.

I would like to locate the blog at something like:
http://www.mysite/blog

If I had an index.html or index.php file in the blog directory then the blog would be launched. As the main perl script is named pe_pplug.pl, how do I make this work. I thought it would be as simple as creating a .htaccess file in the blog directory with the contents of:

DirectoryIndex pe_pplog.pl index.html index.php index.htm

but this didn't work.

Should the blog and Web-Server directories be sub directories of the blog directory? or do I put the contents of the blog and Web-Server directory at the blog level directory?

Regards

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

#41 Post by efiabruni »

There are two ways to do this. The easiest is to unzip the blog in the web server root directory as is and put an index.php file in the web-server/blog directory with the following:

Code: Select all

<?php
	if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
		$uri = 'https://';
	} else {
		$uri = 'http://';
	}
	$uri .= $_SERVER['HTTP_HOST'];
	header('Location: '.$uri.'/pe_pplog.pl/');
	exit;
?>
this will redirect any request to localhost/blog to localhost/pe_pplog.pl without any need for .htacces files or the like.

if you don't like the .pl ending showing put the blog directory of the zip file into the blog directory of the web-server. For example the pe_Config.pl file would then be located in web-server/blog/blog/pe_Config.pl.
Move the pe_pplog.pl and pe_admin.pl to web-server/blog.
Leave the /css /js and /image folders in web-server.
Add an .htacces file to the web-server/blog folder with

Code: Select all

DirectoryIndex pe_pplog.pl
These directions assume the server is an Apache web-server

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#42 Post by smokey01 »

Neither suggestion worked. I am getting a 403 (forbidden) error.

I have check the permissions. Directories are 755 and files 644.

From the http://www.MySite.com/public_html my directory structure is:

.
|-- blog
| |-- CHANGELOG
| |-- change.pl
| |-- comments
| |-- contact.pl
| |-- editConfig.pl
| |-- LICENSE
| |-- newGallery.pl
| |-- pe_Config.pl
| |-- pe_Config.pl.bak
| |-- posts
| | |-- 00000.ppl
| | `-- hits.ppl.hits
| |-- readme
| | |-- README
| | |-- README_GER
| | |-- README_GERhiawatha
| | `-- README_GERzip
| `-- sub.pl
|-- css
| |-- menu2.jpg
| |-- menu3.jpg
| |-- menu.jpg
| |-- m_menu2.jpg
| |-- m_menu3.jpg
| |-- m_menu.jpg
| |-- mobile.css
| `-- style.css
|-- images
| |-- news-feed.png
| |-- prettyPhoto
| | |-- dark_rounded
| | | |-- btnNext.png
| | | |-- btnPrevious.png
| | | |-- contentPattern.png
| | | |-- default_thumbnail.gif
| | | |-- loader.gif
| | | `-- sprite.png
| | |-- dark_square
| | | |-- btnNext.png
| | | |-- btnPrevious.png
| | | |-- contentPattern.png
| | | |-- default_thumbnail.gif
| | | |-- loader.gif
| | | `-- sprite.png
| | |-- default
| | | |-- default_thumb.png
| | | |-- loader.gif
| | | |-- sprite_next.png
| | | |-- sprite.png
| | | |-- sprite_prev.png
| | | |-- sprite_x.png
| | | `-- sprite_y.png
| | |-- facebook
| | | |-- btnNext.png
| | | |-- btnPrevious.png
| | | |-- contentPatternBottom.png
| | | |-- contentPatternLeft.png
| | | |-- contentPatternRight.png
| | | |-- contentPatternTop.png
| | | |-- default_thumbnail.gif
| | | |-- loader.gif
| | | `-- sprite.png
| | |-- light_rounded
| | | |-- btnNext.png
| | | |-- btnPrevious.png
| | | |-- default_thumbnail.gif
| | | |-- loader.gif
| | | `-- sprite.png
| | `-- light_square
| | |-- btnNext.png
| | |-- btnPrevious.png
| | |-- default_thumbnail.gif
| | |-- loader.gif
| | `-- sprite.png
| `-- smilies
| |-- angry.png
| |-- cry.png
| |-- dilemma.png
| |-- happy.png
| |-- heart.png
| |-- lol.png
| |-- mmh.png
| |-- oh.png
| |-- ouch.png
| |-- sad.png
| |-- shock.png
| |-- surprised.png
| `-- wink.png
|-- js
| |-- jquery.prettyPhoto.js
| |-- prettyPhoto.css
| `-- README
|-- .htaccess
|-- index.php
|-- pe_admin.pl
|-- pe_pplog.pl
`-- README


Server Software
Apache: 2.2.23
CentOS: CentOS release 6.4 (Final)
cPanel: 11.36.2 (build 4)
Curl: 7.12.1
MySQL 5.5.33
phpMyAdmin 3.5.5
Python: 2.6.6
Perl: 5.8.8
PHP: 5.2.17
ionCube Loader: 4.2.2
Zend Optimizer: 3.3.9
Ruby: 1.8.7
Rails: 2.3.18
OpenSSL: 1.0.0-fips

My other blog runs fine but it's written in php not perl.

I'm running out of ideas.

Cheers
Attachments
directory.tar
Clearer directory structure
(20 KiB) Downloaded 370 times

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

#43 Post by efiabruni »

Ok, I see three possibilities
1. The server is not set up to allow .htaccess files. In this case the 403 Error should read like:
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
In this case use the solution with the php script

2. I think this is the case here:
The server is not set up to run cgi files from outside of the cgi-bin folder.

then error message is likely:
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
try and add the following to your .htacces file:
AddHandler cgi-script .pl
Options +ExecCGI
3. The server does neither allow for htaccess files nor cgi scripts outside of the cgi-bin

In this case, rename the pe_pplog.pl and pe_admin.pl to pe_pplog and pe_admin, make them executable and move them to the cgi-bin.
Move the blog folder to the cgi-bin
change the index.php file to:

Code: Select all

<?php
   if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
      $uri = 'https://';
   } else {
      $uri = 'http://';
   }
   $uri .= $_SERVER['HTTP_HOST'];
   header('Location: '.$uri.'/cgi-bin/pe_pplog.pl/');
   exit;
?>

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#44 Post by smokey01 »

efiabruni wrote:Ok, I see three possibilities
1. The server is not set up to allow .htaccess files. In this case the 403 Error should read like:
You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.
In this case use the solution with the php script
The server is fine with .htaccess files, in fact I use them to assign icons and descriptions like:
http://smokey01.com/software/Fatdog64-600/
efiabruni wrote: 2. I think this is the case here:
The server is not set up to run cgi files from outside of the cgi-bin folder.

then error message is likely:
You don't have permission to access the requested object. It is either read-protected or not readable by the server.
try and add the following to your .htacces file:
AddHandler cgi-script .pl
Options +ExecCGI
This didn't fix the problem either. It really seems to be some sort of permissions problem
efiabruni wrote: 3. The server does neither allow for htaccess files nor cgi scripts outside of the cgi-bin

In this case, rename the pe_pplog.pl and pe_admin.pl to pe_pplog and pe_admin, make them executable and move them to the cgi-bin.
Move the blog folder to the cgi-bin
change the index.php file to:

Code: Select all

<?php
   if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) {
      $uri = 'https://';
   } else {
      $uri = 'http://';
   }
   $uri .= $_SERVER['HTTP_HOST'];
   header('Location: '.$uri.'/cgi-bin/pe_pplog.pl/');
   exit;
?>
Option three didn't work either.

Here is the really strange bit. CatDude has exactly the same blog set up on the same company's server but under a different account.

It really seems like I have to enable perl scripts to run. Hostgator allows perl as you can see from a previous post. I guess I might need to put some definition in the .htaccess to do this, I just need to work out what that syntax is.

Thanks

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

#45 Post by efiabruni »

Ok, I'm out of ideas as well. Hosting companies can be specific with cgi script set ups, I guess. Let me know if you solve this problem. Sorry I couldn't help :(

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#46 Post by smokey01 »

efiabruni your advice was very close and on the right track.

You suggested adding this to the .htaccess file:
AddHandler cgi-script .pl
Options +ExecCGI
This is what got it working:

Code: Select all

Options Indexes FollowSymLinks MultiViews +ExecCGI
AddHandler cgi-script .py .pl .cgi
Thanks again

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#47 Post by smokey01 »

efia, I sent you a couple of messages to your gmail account.

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

#48 Post by efiabruni »

I saw the messages and answered :)

some lessons learned from the epic battle of setting the pe_pplog up on a live server:

the zip file is set up to extract in the web-server root, not a sub-folder (I will change this in the next version, but for know to avoid headaches it might be easier to follow this)

To execute cgi-scripts write the following in the .htaccess file:
[quote=smokey01]Options Indexes FollowSymLinks MultiViews +ExecCGI
AddHandler cgi-script .py .pl .cgi[/quote]
without MultiViews, as this might mess with js files (according to my experience, though I cannot explain why)

To get prettyPhoto to work add the following in $config_customHTMLhead:

Code: Select all

<script src=js/jquery.prettyPhoto.js></script>

efiabruni
Posts: 69
Joined: Tue 18 Oct 2011, 15:55

new Release!

#49 Post by efiabruni »

I proudly present the latest version of the pe_pplog. Thank you to Grant and Chris for suggestions :)

Some changes:
Fixing some path issues and adding an htaccess file to make it easier to upload and run the zip file on a live server.

replaced prettyPhoto with a css solution, lightboxes are now made with the "box" button. {box=thumbnail title=title}photo or text(any bbcode works in here){/box}. If there is no thumbnail the title will be clickable. Example.

possibility to use other programs than sendmail to send mail or to save mails locally and read them from the admin page.

notes to save and publish later

smiley buttons (like in this forum)

See first post for more info and download

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#50 Post by BarryK »

efiabruni,
I like your pe_pplog very much! :D

I have installed it, see here:

http://bkhome.org/news/

As you can see, I have worked on the theme a bit.

I turned off jquery, as it seems that calls to jquery.com slow the first page load down a bit?

I am using your latest version.

I put back the option to have numeric-only security code, coz I like that.

I found a bug. When I made the fourth entry, number 00004, the last line in file posts/00004.ppl had this:

Code: Select all

<br />¬23 Nov 2013, 9:36¬Insight¬posts
whereas it should have been:

Code: Select all

<br />¬23 Nov 2013, 9:36¬Insight¬00004
This meant that the entry did not display when I clicked on that post (it was listed in the menu).
I manually fixed it by downloading file 00004.ppl and editing it.
[url]https://bkhome.org/news/[/url]

Post Reply