Page 1 of 2

[3.3][RC] [3.2] phpBB.de Pastebin

Posted: Tue Jan 20, 2015 6:51 pm
by gn#36
Extension Name: phpBB.de Pastebin
Author: gn#36

Extension Description: Adds a pastebin to your forum.
Extension Version: Release Candidate (2.0.2)


Requirements: phpBB 3.2.4 or newer

Features:
  • See https://www.phpbb.de/pastebin/
  • File upload or code window for the source code to upload
  • Syntax Highlighting using GeSHi
  • Language selection is currently hardcoded to a subset of GeSHis capabilities
  • Automatic deletion of entries after 1-6 months
  • Exceptions from automatic deletion possible
  • CAPTCHA support for securing entries
Features Requested:
I don't guarantee I'll put these in, but I might ;)
  • Hidden entries (need link for access)
Screenshots: none yet

Demo URL: none yet

Extension Download: https://github.com/phpbb-de/phpbb-ext-pastebin (you will need to install dependencies using composer to get GeSHi, it is not included)

Re: [DEV] phpBB.de Pastebin

Posted: Tue Jan 20, 2015 10:21 pm
by Raul [ThE KuKa]
I like!

Thanks. ;)

Re: [DEV] phpBB.de Pastebin

Posted: Wed Jan 21, 2015 3:03 pm
by alhitary
pastebin
plz explain more what it does it mean ?

Re: [DEV] phpBB.de Pastebin

Posted: Wed Jan 21, 2015 3:16 pm
by Raul [ThE KuKa]
Copy/paste code and/or "fragments" of code, and share this code "fragments" code with other users.
http://pastebin.com/

Re: [DEV] phpBB.de Pastebin

Posted: Sat Feb 14, 2015 4:03 pm
by gn#36
I have updated the Pastebin
  • The Deletion Cron Job should now actually do it's job
  • CAPTCHA capabilities added to protect from Bots
  • It is now possible to exclude certain entries from deletion (permission based)

Re: [DEV] phpBB.de Pastebin

Posted: Sat Feb 14, 2015 4:33 pm
by bonelifer
Feature request: Public/Private(unlinked, ie[not permissions based]only can be gotten to by someone whose been given the link) pastes link.

Re: [DEV] phpBB.de Pastebin

Posted: Sat Feb 14, 2015 9:32 pm
by gn#36
Interesting idea. I put that on my list.

I would basically say that this is almost already the case - I will only need a switch to disable the recent entries list on the right and replace the predictable ID in the link by some sort of hash. Then by disabling the list you have your hidden entries. There is no complete list of all entries anyways.

Re: [ALPHA] phpBB.de Pastebin

Posted: Wed Nov 25, 2015 3:55 pm
by TWEagle
how must I include GeShi??

Re: [ALPHA] phpBB.de Pastebin

Posted: Wed Nov 25, 2015 4:03 pm
by 3Di
Interesting extension, I will take in consideration porting as extension (dunno when) my pastebin MOD for phpBB 3.0.14 that lies unused (I will not share it though) into my local environment. Or maybe I will make some PRs to yours. Repository forked.

Regards.

Re: [ALPHA] phpBB.de Pastebin

Posted: Wed Nov 25, 2015 4:14 pm
by gn#36
The_White_Eagle wrote:how must I include GeShi??
Use composer for this (https://getcomposer.org/download/).

Before uploading the extension to your webspace, unpack it in a local folder and cd to it with a shell (e.g. bash on linux or the windows shell in windows). Then, assuming you downloaded composer into the same folder, run php composer.phar install. That will download all necessary components for you. After that, you can simply upload the extension folder, which now includes a "vendor" dir, to your webspace. Of course you can run this on your webserver as well if you have shell access there.

Re: [ALPHA] phpBB.de Pastebin

Posted: Wed Nov 25, 2015 5:19 pm
by 3Di
Ah, ok. It is "based" on the 0.2.1 version of mine. Thanks for the credits. :)
BTW the latest was (is) 0.3.0.

Anyway, very good job you did, just I do not understand the reason why Geshi isn't included.

Re: [ALPHA] phpBB.de Pastebin

Posted: Wed Nov 25, 2015 6:20 pm
by gn#36
Yes it is, even though I didn't know there was a newer version than this. Feel free to send pull requests if you can improve something. Currently, the code is a little messy, though. There are several things in there multiple times.

Regarding geshi: It will be in all release packages. But I don't see a reason to include it in the repository if it can be auto-installed. This way, I can also easily test upgrading to a different geshi version by just telling it to install a new version of it. This is basically the exact same way phpBB itself is also dealing with dependencies.

Re: [ALPHA] phpBB.de Pastebin

Posted: Wed Nov 25, 2015 7:05 pm
by Elias
Very very nice extension! :!:

Re: [ALPHA] phpBB.de Pastebin

Posted: Wed Nov 25, 2015 7:13 pm
by 3Di
gn#36 wrote:Yes it is, even though I didn't know there was a newer version than this.
In fact, I did never published it. A lot of thing have been implemented since 0.2.1.

Like a collapsible moderation panel right on the top of the snippet, prune time frames like the original pastebin (1 day, 1 month, 3 months or NEVER) without a cron job though (does yours effectively works?),

Uses the original gesghi 1.0 and beyond ( here's my fork https://github.com/3D-I/geshi-1.0 ), permissions, configs and tables added, captcha for guests also added.. etc..
gn#36 wrote:Currently, the code is a little messy, though.
I see, no probs.
gn#36 wrote:Regarding geshi: It will be in all release packages. But I don't see a reason to include it in the repository if it can be auto-installed. This way, I can also easily test upgrading to a different geshi version by just telling it to install a new version of it. This is basically the exact same way phpBB itself is also dealing with dependencies.
Well, the latest geshi update was at 22 OCT 2014 :?

I don't know what to do now, perhaps it is simple to rewrite it from the scratch using your efforts or to make PRs, a good question. :)

Also because I am busy on another extension I would like to make it available sooner or later.

Re: [ALPHA] phpBB.de Pastebin

Posted: Wed Nov 25, 2015 8:13 pm
by gn#36
The cron job should be fully functional, yes, and I basically offer the same options.

I don't know whether the variable names I chose work with that cronjob monitoring extension, though, but that is a minor thing that could obviously be easily changed.

Regarding Geshi: Well, it should also be easier to replace geshi with something else if I keep all the external code nice and separate inside that vendor dir. Makes it very clear what is external and what is not. Also, this way I don't have to fix any coding guideline violations reported by the extension prevalidator inside geshi when I turn it in for the Extension database.