Not logged in. · Lost password · Register
Forum: Customising UNB Modifications and plug-ins Plug-in gallery RSS
Pinwand Plugin
Rumbelstilzchen #1
Member since Sep 2005 · 137 posts
Group memberships: Members
Show profile · Link to this post
Subject: Pinwand Plugin
OK - here is my release of the Pinwand-Plugin.
Honestly I have to say it is a modification of the pinomat form www.je0.de

As I cant exactly describe what it is for - have a look at http://spiritus-erlangen.de/forum/box

Features:
  • all pins can be moved with 'drag & drop'
  • some smilies are supported
  • the last three pins are in a different colour
  • many browsers are supported (IE6, IE7, Firefox 1.5 & 2.0, Opera)
  • sort the pins by the last two days
  • name of logged in users will be used
  • some low spam-bot protections
  • Pins can be deleted by Admins and Mods
  • easy to install and configure
Jugendkreis
petrosilius.de
The author has attached one file to this post:
pinwand_20070211_2.zip 18.7 kBytes
You have no permission to open this file.
This post was edited 4 times, last on 2009-08-14, 00:43 by Rumbelstilzchen.
Avatar
Draghmar #2
Member since Dec 2006 · 63 posts
Group memberships: Members
Show profile · Link to this post
Is RewriteRule necessary for Pinwand to work? Because I couldn't add it right now and plugin isn't working...Some error message appears after creating Pin but without text - only message box, and Pin isn't created.
"I have come up with a plan so cunning you could stick a tail on it and call it a weasel."
Avatar
Draghmar #3
Member since Dec 2006 · 63 posts
Group memberships: Members
Show profile · Link to this post
It's still don't work but this post is not about that. I translated Pinwand to Polish language and I did some changes in box.html - there are three words wrote in English so you have to translate them in here too (if you want of course) but you can simply add two lines in lang file with translation of 'name' and 'text' and in box.html add {tr "_box.name you used in lang file"}. As for third word from box.html I used there {tr "_box.pagetitle"}.

In box.en.php there is no $UNB_T['_box.error_nojava'] line.

Shouldn't $UNB_T['_box.error_texttoolong'] have dynamic value? There is wrote that max length of pin is '500 sings' but this can be changed in plugin settings.

Things I added to lang file:
  1. $UNB_T['_box.error_nojava'] = 'Obs?uga JavaScript musi by? w??czona!';
  2. $UNB_T['_box.nick'] = 'Nick:';
  3. $UNB_T['_box.text'] = 'Tekst:';
Things I changed in box.html:
  1. Name: -> {tr "_box.nick"}
  2. Text: -> {tr "_box.text"}
  3. Pinwand -> {tr "_box.pagetitle"}

Edit: hehe...Now in box that I mentioned before appears error message about JavaSript. But I still don't know why - JS is enabled in my browser...I have FF and it seems that this error appears only in FF (I tested in IE7 and Opera) but it still didn't create new pin in any browser. :(
"I have come up with a plan so cunning you could stick a tail on it and call it a weasel."
The author has attached one file to this post:
box.pl.php 2.2 kBytes
You have no permission to open this file.
This post was edited on 2007-02-11, 17:23 by Draghmar.
Rumbelstilzchen #4
Member since Sep 2005 · 137 posts
Group memberships: Members
Show profile · Link to this post
mist - In the install.php was an error.

For those who have tried this plugin already you have to uninstall it
        Delete the according lines in your board.conf.php

Now You can just reinstall it.

@Dragmar Your changes have been added

I've updated the files
Jugendkreis
petrosilius.de
Avatar
Draghmar #5
Member since Dec 2006 · 63 posts
Group memberships: Members
Show profile · Link to this post
Ok. Now it works in IE and Opera but still not in FF - JS error (at least in mine FF :-p). But if you comment line 42 in pinomat.php or change $pm_x and $pm_y to something above 0 then it will work...mostly...because each time you refresh page it will reset position of pins added in FF to position 0.0 (even in other browsers).

Line 42:
  1. if ($pm_x==0 || $pm_y==0) $Fehler.= $UNB_T['_box.error_nojava']."<br />";

PS
There is confirmation window when you want to delete pin with German language - you need to manually change it in line 56 in pinomat.js. Is there no way to make it language dependable like everything else?
PS2
Language files needs to have UTF-8 encoding (pinomat.js too if line 56 will stay as it is now ;))
"I have come up with a plan so cunning you could stick a tail on it and call it a weasel."
Rumbelstilzchen #6
Member since Sep 2005 · 137 posts
Group memberships: Members
Show profile · Link to this post
Quote by Draghmar:
Ok. Now it works in IE and Opera but still not in FF - JS error (at least in mine FF :-p). But if you comment line 42 in pinomat.php or change $pm_x and $pm_y to something above 0 then it will work...mostly...because each time you refresh page it will reset position of pins added in FF to position 0.0 (even in other browsers).
I don' know why it isn't working at your board. As I've seen it worked for you at my board.
May you provide me a link to your board?
ähm did you open forum.php?req=box&install=1  ?

what values are written in your board.conf.php ? The last lines should be something like:
box_spam = 5
box_pinanzahl = 100
box_laenge = 500
box_umbruch = 40
box_maxX = 1200
box_maxY = 720

Quote by Draghmar:
..you need to manually change it in line 56 in pinomat.js. Is there no way to make it language dependable like everything else?
I've already thought about it and I have no idea how to solve it :-(

Quote by Draghmar:
Language files needs to have UTF-8 encoding (pinomat.js too if line 56 will stay as it is now ;))
with pinomat.js file it doesn't make any sense (because it has to be UTF-8 without BOM) as there are no special chars in it.

Quote by Draghmar:
  1. if ($pm_x==0 || $pm_y==0) $Fehler.= $UNB_T['_box.error_nojava']."<br />";
This line was only added for spam protection, thus I would leave it as it is and not to comment it out
Jugendkreis
petrosilius.de
Avatar
Draghmar #7
Member since Dec 2006 · 63 posts
Group memberships: Members
Show profile · Link to this post
I used link with install and I have same values as you. I don't know why it won't work...But this must be something with code on my side but I don't know what exactly.
I can't provide you a link to board that I'm working on because it's on local sever. But I have old copy of UNB (old means before I start my changes) so you can try there.

Quote by Rumbelstilzchen:
with pinomat.js file it doesn't make any sense (because it has to be UTF-8 without BOM) as there are no special chars in it.
Yes it does when you use translated line 56 with special chars like in Polish language. :D
"I have come up with a plan so cunning you could stick a tail on it and call it a weasel."
Rumbelstilzchen #8
Member since Sep 2005 · 137 posts
Group memberships: Members
Show profile · Link to this post
I must confess I have no idea why it is not working in Firefox.
This JavaError means that the x,y-coordinates aren't correctly passed to php. But that only in firefox.

As I have seen you have got a broken css-style
http://draghmar.ovh.org/forum/unb_lib/designs/modern/css/threadattributes.css.php
Fehler: Das Stylesheet http://draghmar.ovh.org/forum/test.shtml wurde nicht geladen, weil sein MIME-Typ, "text/html", nicht "text/css" ist.
Quelldatei: http://draghmar.ovh.org/forum/forum.php?req=box
Zeile: 0
pehaps just try disabling the threadattributes-plugin
As I've said I have no idea. :-(
Jugendkreis
petrosilius.de
Avatar
Yves (Administrator) #9
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
.php files produce a MIME type of text/html or something similar. Please have a look at UNB's shipped .css.php files and copy the header('Content-Type...') line into your CSS files. Firefox will only load text/css files for stylesheets.
The Expires line can't hurt, too, if you want to increase your site's performance.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
Draghmar #10
Member since Dec 2006 · 63 posts
Group memberships: Members
Show profile · Link to this post
This is funny error because file test.shtml don't have anything else in it but simple text: Test. There is no any declaration, and no css needed. I needed this file for some tests but not related with UNB.
Each css file has this declaration that you talking about Yves. I noticed this error with css file yesterday too but I have no idea where it came from...Right now I don't have time for investigation...maybe tomorrow...and what I can do with this 'Expires" line to increase performance?
I've seen some odd errors in apache's log...hmm...I really must check this when I'll find some time.
BTW. Threadattributes-plugin is disabled because I even don't know what exactly it can do. ;)
"I have come up with a plan so cunning you could stick a tail on it and call it a weasel."
Avatar
Yves (Administrator) #11
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
If the web server sends an 'Expires' header along with the data, I have seen Firefox not even asking the web server if there was an update of the file upon subsequent requests of that particular file. Which is with every new page request, because all pages link to that stylesheet. But since PHP scripts are executed everytime new, there obviously isn'T a 'last modification' date that the server could compare the 'If-Modified-Since' header (from the browser) with, so the file has *always* changed and thus mus always be downloaded again. And you understand that always downloading the stylesheet versus not downloading it at all but taking it from the browser's local cache is a considerable speedup. :)
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
Draghmar #12
Member since Dec 2006 · 63 posts
Group memberships: Members
Show profile · Link to this post
So you're saying that I should delete Expire line in each *.css.php? But if this line is making some problems then why it is there? From what I understand it should force browser to refresh cash because there could be some changes, yes? (Normally I cast special spell above something that had some changes called 'Master Refresh' ;))

Off Topic:
Maybe you could split this thread into another one because right now this is Off-Topic :-p
"I have come up with a plan so cunning you could stick a tail on it and call it a weasel."
Avatar
Yves (Administrator) #13
User title: UNB developer & webmaster
Member since Jan 2004 · 3814 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Off Topic:
Did I say you should delete it? You should not delete it but instead include it if it's not yet there. It doesn't make problems, it increases your page performance. Please read my post again carefully.

@OT: Well, I can't split posts apart so we'll better leave it now.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
Draghmar #14
Member since Dec 2006 · 63 posts
Group memberships: Members
Show profile · Link to this post
Off Topic:
Ohh...Now I understand. I just didn't catch this at first time because each *.css.php file has this line inside by default (that was obvious for me), so I thought that you may suggest me to change something with it...Just little misunderstanding :). EOT
"I have come up with a plan so cunning you could stick a tail on it and call it a weasel."
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Go to forum
This board is powered by the Unclassified NewsBoard software, 20110527-dev, © 2003-2011 by Yves Goergen
Page created in 255.3 ms (167.8 ms) · 127 database queries in 145 ms
Current time: 2012-02-08, 09:12:17 (UTC +01:00)