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 23 Apr 2014, 19:53
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 3 of 3 [37 Posts]   Goto page: Previous 1, 2, 3
Author Message
jamesbond

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

PostPosted: Sun 23 Jun 2013, 15:33    Post subject:  

Following efia's excellent "style" bb code, I added this "class" bbcode so that I can use pre-defined CSS classes instead of typing a long CSS string every time I want to change colours or font-size etc.

In bbcode, add:
Code:
s/\[class=(.+?)\](.+?)\[\/class\]/<span class=$1>$2<\/span>/gi; # james class


In bbdecode, add:
Code:
s/\<span class=(.+?)\>(.+?)\<\/span\>/\[class=$1\]$2\[\/class\]/gi; # james class


I considered adding [h2] and [h3] codes to make <h2> and <h3> as well, but I figured I could achieve the same thing with the "class" bbcode (like, [class=h2]heading2[/class]).

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


Joined: 16 Sep 2009
Posts: 2368
Location: UK

PostPosted: Tue 02 Jul 2013, 18:44    Post subject:  

updated to 1.5
thanks to efiabruni and jamesbond for all their updates! Smile

changelog for 1.5:

- fixes in single quotes
- fixes for unquoting stuff (for nicedit?)
- added [style] and [center] bcode
- fixed order of archive entries,
- moved config and funcs to external files..
- added $config_currentStylesheet..
- added admin page to edit config file & stylesheet.. (link to admin page in menu)
- fallback to default css file (style1.css) & print error, if needed..
- added 'class' to bbcode..
- added .error class in style1.css

i still plan to do add:

- mobile css
- contact page without sendmail

screenshot of admin page: http://i.imgur.com/WUn3NFT.png
sjpplog-1.5-akita.pet
Description 
pet

 Download 
Filename  sjpplog-1.5-akita.pet 
Filesize  88.6 KB 
Downloaded  86 Time(s) 

_________________
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: Tue 02 Jul 2013, 23:19    Post subject: nice  

I see you found my editConfig page did it work ok for you or did you find any kinks? On my admin page I had added a test for if there is a syntax error in the Config file, basically

Code:
do "pe_Config.pl" or print ""There is something wrong with your Config. file using pe_Config.pl.bak. The blog is working, but maybe not how you want to?";


Did you get the mobile css to work? It is working for me, I tested it on several Iphones I could get my hands on and my Android and it was working, but I did notice that I had to add the line

Code:
<meta name="Viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scaleable=yes"/>


to the header to make it display in a readable font size.
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2368
Location: UK

PostPosted: Wed 03 Jul 2013, 15:23    Post subject: Re: nice  

efiabruni wrote:
I see you found my editConfig page did it work ok for you or did you find any kinks? On my admin page I had added a test for if there is a syntax error in the Config file, basically

Code:
do "pe_Config.pl" or print ""There is something wrong with your Config. file using pe_Config.pl.bak. The blog is working, but maybe not how you want to?";

Yeah it works fine, the only the difference is I integrated it into the main pup_pplog.pl file, keeping it in one file, so that it follows the same coding style as the rest of the script, and the other bits i added before, i did the same way, so it was the easiest way for me.

Quote:
Did you get the mobile css to work? It is working for me, I tested it on several Iphones I could get my hands on and my Android and it was working, but I did notice that I had to add the line
Code:
<meta name="Viewport" content="width=device-width, initial-scale=1.0, maximum-scale=2.0, user-scaleable=yes"/>


to the header to make it display in a readable font size.

I haven't had a good play with it since last time - i boot a 'fresh' install each time, and dip into whatever.. I plan to add it soon... will be doing other stuff for a bit, then come back to it.. thanks for all your updates and stuff, very useful! Smile

BTW, i actually have planned for a long time to integrate a csv2<table> <table>2sortable, table2graph/csv2graph etc (i have the libraries ready to test), and then ultimately to have something like:

[chart="pie"]/path/to/file.csv[/chart]

[chart="bar"]/path/to/file.csv[/chart]

[table]/path/to/file.csv[/table]

[sortable]/path/to/file.csv[/sortable]

and so on... the libraries I might use are:

csv2table, graphtable/cubism/tablechart/etc, jquery.tablesorter,

And I also found a nice little PERL calendar called "calendar3", or another lighter one if i find it, which I'm vaguely planning to integrate nicely with posts/archives somehow.... at some point... Wink

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


Joined: 16 Sep 2009
Posts: 2368
Location: UK

PostPosted: Thu 04 Jul 2013, 20:43    Post subject:  

updated to 1.6

- added support for mobile css themes



..screenshot says 1.5, but it's 1.6 that is running on the phone
sjpplog-1.6-akita.pet
Description 
pet

 Download 
Filename  sjpplog-1.6-akita.pet 
Filesize  89.53 KB 
Downloaded  96 Time(s) 

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


Joined: 17 Jul 2011
Posts: 423
Location: Greece

PostPosted: Tue 30 Jul 2013, 17:36    Post subject:  

I have noticed a weird bug on the original Pplog. When a user puts an apostrophe in the comments, "breaks" the comment into two, creating two comments with the content until the apostrophe in the first half and the rest of the content in the second half. Does SjPplog have the same problem? Any ideas how to solve it?
_________________
Christos Koulaxizis
Woof woof from Greece...

[ Puppy packages | Puppy search ]
Back to top
View user's profile Send private message Visit poster's website 
efiabruni

Joined: 18 Oct 2011
Posts: 68

PostPosted: Tue 01 Apr 2014, 05:31    Post subject: security issue  

There is a security issue with having bbcode enabled in comments in all the pplogs (original, SJPPlog and the pe_pplog)

Due to very admissive parsing of the bbcode it is possible to insert javascript in comments when posting a link or a picture. Basically one can enter: [ u r l=javascript:maliciouscode]click![/ u r l]
See last comment on http://pplog.scottjarvis.com/?viewDetailed=00021 for an example. This makes comments vulnerable to xss attacks.

My advise is to disable bbcode on the comments of ALL versions of the PPLOG

What is needed:
URL / SRC validating and escaping
strict rules for which attributes are allowed, validating and escaping
additional html escaping
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 3 [37 Posts]   Goto page: Previous 1, 2, 3
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.0658s ][ Queries: 13 (0.0102s) ][ GZIP on ]