Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 22 Oct 2014, 10:29
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
SJPPLOG - Scotts jQuery PPLOG
Moderators: Flash, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 3 [37 Posts]   Goto page: Previous 1, 2, 3 Next
Author Message
jamesbond

Joined: 26 Feb 2007
Posts: 2229
Location: The Blue Marble

PostPosted: Wed 22 May 2013, 13:08    Post subject:  

Thanks Scott for the update.

Apology, my earlier patch for apostrophe and quotes were half-assed.
Instead of s/'/'/; one should have s/'/'/g; (note the extra "g").
Same with quotes, instead of s/"/"/; one should have s/"/"/g; (note the extra "g").

The archiving doesn't work for me (it says "no post in archive"), I made it work by replacing
my @dates = map { split(/"/, $_); @_[2].'|'.@_[4].'|'.@_[0]; } @entries;
with
my @dates = map { my @stuff = split(/"/, $_); @stuff[2].'|'.@stuff[4].'|'.@stuff[0]; } @entries;.

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
efiabruni

Joined: 18 Oct 2011
Posts: 68

PostPosted: Wed 05 Jun 2013, 21:05    Post subject: contact me page  

I wrote a contact me page for the pe_pplog, which can also be used in this blog. It looks like this. It uses the email address from $config_sendMailWithNewCommentMail and mailto has to be installed. $config_contactAddress is added to the $config vars for the contact info and a "Contact me" link in the main menu.
contactpage.patch.gz
Description  gunzip to use
gz

 Download 
Filename  contactpage.patch.gz 
Filesize  1.3 KB 
Downloaded  165 Time(s) 
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2385
Location: UK

PostPosted: Thu 06 Jun 2013, 10:58    Post subject: Re: contact me page  

efiabruni wrote:
I wrote a contact me page for the pe_pplog, which can also be used in this blog. It looks like this. It uses the email address from $config_sendMailWithNewCommentMail and mailto has to be installed. $config_contactAddress is added to the $config vars for the contact info and a "Contact me" link in the main menu.

That's awesome Smile, great.. Also, have you tested the changes above by jamesbond? Do you they work for you too? If so, I'm gonna add them into 1.5 when its done (with your contact page too)..

Very Happy

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
efiabruni

Joined: 18 Oct 2011
Posts: 68

PostPosted: Fri 07 Jun 2013, 19:34    Post subject: bugfixes  

jamesbonds bugfixes are working for me, I actually never had a problem with the map{} in the archive, I guess it depends on the version of perl?

I noticed that the wysiwyg editor (niceedit) isn't working, apparently it should be:
Code:
<script src="http://js.nicedit.com/nicEdit-latest.js" type="text/javascript"></script>


instead of:
Code:
 <script src="http://js.nicedit.com/nicEdit.js" type="text/javascript"></script>


according to http://niceedit.com

I took it out of my blog completely, so I cannot really test if that is true...

I'm also atm creating a style sheet for mobile devices, would you be interested in that? It does need some more testing, though.
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2229
Location: The Blue Marble

PostPosted: Sat 08 Jun 2013, 12:15    Post subject:  

Yeah, it could be. Mine is perl 5.14.2 and 5.10.1.

Nicedit works for me. Actually I forgot about it totally and is about to ask whether someone could create bbcode for "colour" and "fontsize", then I saw this post Smile Perhaps I should re-activate the html editor, but I still want to the bbcode for the lightbox and and code Sad (which is gone once I turned on the html editor).

I created a simple stat like the one in here: https://planet.gnome.org/ ==> scroll to the bottom of the page and you'll see a world map showing where the visits come from. Let me know if any of you are interested. The web server must have "gd" library installed, also "netpbm", and you must have at least 50MB to hold the geocode database in your webspace as the IP address geocoding is done locally - there is no external queries to third party geocoding services Very Happy

EDIT: Need to pull out my above comment about nicedit. It works, yes you can edit and enter text, but the resulting post is not right. That's because of the aggresive quote transformation (" change the &quot; etc). The quote transformation should be disabled when nicedit is used. I'm not sure however how it will impact the field splitting if the transformation is disabled, because a single quote in the blog post can screw up the field numbering ... Crying or Very sad

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
efiabruni

Joined: 18 Oct 2011
Posts: 68

PostPosted: Sat 08 Jun 2013, 21:30    Post subject: bbcode for color and font-size  

in my blog I use a style button for any styling needs one might have:

example

Code:
sub bbcode
s/\{style=(.+?)\}(.+?)\{\/style\}/<p style=$1>$2<\/p>/gi;

Code:


sub bbdecode
s/\<p style=(.+?)\>(.+?)\<\/p\>/\{style=$1\}$2\{\/style\}/gi;


button:
Code:
<input type="button" style="color:red" onClick="surroundText(\'{style=text-size:;color:}\', \'{/style}\', document.forms.submitform.content); return false;" value="style" />


if you exchange the curly brackets with [] this should work in the SJPPLOG as well.
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2229
Location: The Blue Marble

PostPosted: Sun 09 Jun 2013, 09:48    Post subject:  

Thanks efia, that's a good one. I'll be putting that to my blog too.

I found out nicedit problem - we need to unquote the &apos; and &quote; before displaying the html. The same problem also affected your styles, so I was kind of "forced" to fix it Smile

Here is a patch for sjpplog which includes efia's styles + fix for the unquoting + fix for image bbcode (which otherwise, if you put two of them together side by side, all will be lost upon editing, except the final one).
styles-unquote.patch.gz
Description  gunzip first
gz

 Download 
Filename  styles-unquote.patch.gz 
Filesize  1.54 KB 
Downloaded  162 Time(s) 

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2385
Location: UK

PostPosted: Sun 09 Jun 2013, 14:05    Post subject:  

jamesbond wrote:
Thanks efia, that's a good one. I'll be putting that to my blog too.

I will add that to SJPPLOG, but not the simple stat thing - i run sjpplog in akita (it's included by default) so i am trying to keep it really lightweight...

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
efiabruni

Joined: 18 Oct 2011
Posts: 68

PostPosted: Mon 10 Jun 2013, 15:34    Post subject: stats  

I forgot to add UTF-8 support to the contact patch,
accept-charset="UTF-8"
needs to be added to the contact form.

jamesbond: I would be interested to see the stats script Smile
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2229
Location: The Blue Marble

PostPosted: Tue 11 Jun 2013, 12:38    Post subject:  

efia, give me sometime to tidy up the code, then I'll upload it. Watch this space Smile

sc0ttman, the stat script is actually very tiny - all together is 14K. The map background (which I get from wikimedia) is a 130K png file. It is the data file which is huge (36 MB as it is now, I manage to 'compress' it a little) but you shouldn't include these with akita Smile

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
jamesbond

Joined: 26 Feb 2007
Posts: 2229
Location: The Blue Marble

PostPosted: Fri 14 Jun 2013, 08:45    Post subject:  

jamesbond wrote:
efia, give me sometime to tidy up the code, then I'll upload it. Watch this space Smile

Ok the sources are here.

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send private message 
efiabruni

Joined: 18 Oct 2011
Posts: 68

PostPosted: Fri 14 Jun 2013, 15:45    Post subject: stats  

Thank you. Very Happy
This looks...extensive and impressive, I will see if I can make it into a plugin for my blog, but I think not for the next release
Back to top
View user's profile Send private message 
efiabruni

Joined: 18 Oct 2011
Posts: 68

PostPosted: Sun 16 Jun 2013, 19:02    Post subject: style sheet for mobile devices  

For mobile devices (esp phone) the normal blog layout is a bit awkward to use, I tried to make it a bit friendlier, so now on mobile phones it should look something like the screenshot below.

To make the slide out menu I used JQuery, but it is possible to have a similar effect with adding

Code:
div#menu:hover div.show {display:block; text-align:center;}


in the mobile style sheet, only "hover" is not always supported in mobile devices see here.

I had to add some divs and classes to the html of the blog (and of course the JQuery script) to make it work, see diff file below, as well as add the link for the menu.

Because I like playing around with css scripts I also added a @print style to the original css...


I don't have an abundance of mobile phones, so this is not tested thoroughly Smile
style.css.gz
Description  updated original style sheet
gz

 Download 
Filename  style.css.gz 
Filesize  1.08 KB 
Downloaded  145 Time(s) 
mobile.diff.gz
Description  diff file for SJPPLOG v1.4
gz

 Download 
Filename  mobile.diff.gz 
Filesize  937 Bytes 
Downloaded  156 Time(s) 
mobile.css.gz
Description  mobile css file
gz

 Download 
Filename  mobile.css.gz 
Filesize  894 Bytes 
Downloaded  143 Time(s) 
Screenshot-4.png
Description 
png

 Download 
Filename  Screenshot-4.png 
Filesize  99.46 KB 
Downloaded  177 Time(s) 
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2385
Location: UK

PostPosted: Fri 21 Jun 2013, 13:24    Post subject:  

I'm in the process of adding most of this to SJPPLOG, but I have a question or 2 for efiabruni about the updates ..

1. Does the contact page you created for pe_pplog require the sendmail binary to be installed and working?

I ask because akita has no sendmail binary (not even a busybox one) and so I found this, which is a PERL only solution for sending email: http://search.cpan.org/dist/Mail-Sendmail/ ..

I installed it with this command:

Code:
perl -MCPAN -e "install Mail::Sendmail"


I've yet to test it, but seems widely used and reliable by all accounts.
Is this what you're using in your code?

....

2. Do you have any alternative code for your dropdown menu in the mobile theme? ...

Cos I tested your site on my appletart phone and it works mostly fine, except the menu doesn't drop down in safari or any other browser i tried on the phone (all webkit rendering based i believe) ... when I click on the 'Menu' link, the entire page simply reloads 'as is'... :/

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
efiabruni

Joined: 18 Oct 2011
Posts: 68

PostPosted: Fri 21 Jun 2013, 20:53    Post subject: mobile theme and sendmail  

Yes, the contact page relies on sendmail, I basically used the same setting as for "send email with comments". I would love to see the perl solution because sendmail is meh.
Is it possible that you have either javascript turned off in your phone or Jquery disabled in the PPLOG? There is a CSS solution as I wrote in my post (I usually prefer CSS solutions to Javascript ones), but it is unreliable, because it relies on the hover effect.

But if you want to try, just add the CSS bit I wrote in the previous post to the mobile.css and get rid of the JQuery code in index.pl
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 3 [37 Posts]   Goto page: Previous 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0920s ][ Queries: 13 (0.0060s) ][ GZIP on ]