GTAB Lite BBCODE Tabulator - Generate Graphical Guitar Tabs »  Show posts from    to     

Icy Phoenix


Old Customizations - GTAB Lite BBCODE Tabulator - Generate Graphical Guitar Tabs



moreteavicar [ Tue 15 Apr, 2008 20:29 ]
Post subject: GTAB Lite BBCODE Tabulator - Generate Graphical Guitar Tabs
First, what does my mod do?

It is a bit like a musician's equivalent to LaTeX - it allows you to create graphical guitar tabs from some simple input, like this:

mtv_tabulator1

The above example uses higher quality ttf fonts, however, this mod has can use internal gd fonts, if ttf fonts aren't enabled. The gd version of the tab above appears as:

gdfont_1208388920_508388

(The blocky quality is a feature of the internal gd fonts and can't be controlled!).

To my knowledge, until now, nothing like this mod exists, and being a guitarist, I sometimes like to enter guitar tabs on websites (especially my own at least, so I don't have to lose bits of paper with music ideas on them!). The convention is usually to enter such things all in ascii - very time-consuming and unreliable - numbers can appear in the wrong place, losing the order of when notes are meant to be played. My new mod here makes it possible to quickly specify fret numbers and strings in bbcode, and a graphically generated tab image is shown whereer the gtab bbcode is used. For example the above image is generated using:

Code: [Hide] [Select]
[gtab]
title=MoreTeaVicar's Tabulator Solo Run in D;
2,2,2,0; |;
2,2,4,2,4,2;|;
2,2,2,0;|;
51; 21; text=allegro con motto;
32; 23; 32; 21; 51; 101; 51; 72; 73; 72; 51; 101; 141; 101; 102; 113; 102; 101; 141; 171; 141; 152; 143;
[/gtab]


Some features:

You can generate tab for any number of strings! Default is 6.

The mod features its own internal help file - this is displayed by using empty [gtab] tags, e.g: [gtab][/gtab] - so that users can double check to see how the system works.

Font support: By default, the system uses ttf fonts (some fonts are supplied in the zip file). If your gd library does not have ttf font support, then you can use internal gd text generation though another version of the main script gtab.php, located in extras directory. Using gd text though, is not as reliable (in terms of guessing how big to draw the tab image window), and of lesser quality, than using ttf fonts.


Security:

This mod is completely secure:
1) Hotlink prevention - the tab generation script cannot be linked to by another site (i.e. a remote site might know of the existence of this mod on your server,
but they can't steal your bandwidth by embedding an image created by the tab generator on your site).
2) "Hack" characters entered via URL query string will not hack your site - they simply get rendered in the image - harmless.

Demo is available HERE - you don't need to be registered to try it out!

Internal help file can be viewed HERE


Hotlink blocking in action (this is a live attempt to hotlink):

gtab

As shown in the help file: this is called "lite" because there are a number of additional features that I might consider adding at a later date, such as slides, and graphical display of rest periods (currently you can show a full bar rest by using "-" on 3rd string). It would require a bit of work to show rest symbols for other periods (1/4 note, or crotchet, quaver, semi-quaver, demi-semi-quaver etc) so for a more fully featured system I would consider charging a small amount of money for (in the same way calsnail's calendar is avaiable as calendar lite and full version).

Birthday Bonanza? It was my intention to release this and another couple of mods last week on my birthday, but a few things came up, delaying the release(s) - one random thing being that I suddenly got called up to appear in a tv interview on BBC news!

***RE-RELEASE - version 0.0.2***

*CHANGES since 0.0.1*

1) An image is displayed warning of an attempt to hotlink. See above example (red image).
2) Change to the way anti-hotlinking works (previous version depended on http_refferer which is not reliable. If you already have gtab 0.0.1 installed, then you must follow the new install instructions, especially you need to edit page_header.php and copy across the new files.
3) Applied correction to instructions for editing bbcode - so that phpbb_root_path is added to the global vars list for function process_tag.


DWho [ Tue 15 Apr, 2008 21:38 ]
Post subject: Re: GTAB Lite BBCODE Tabulator - Generate Graphical Guitar T
wow fantasic.. definately gonn check this out



nene94 [ Tue 15 Apr, 2008 22:26 ]
Post subject: Re: GTAB Lite BBCODE Tabulator - Generate Graphical Guitar T
WWWOOWWW!!!, Thanks!!!!!!!!


ThE KuKa [ Tue 15 Apr, 2008 22:31 ]
Post subject: Re: GTAB Lite BBCODE Tabulator - Generate Graphical Guitar T
Nice BBCode


Mighty Gorgon [ Wed 16 Apr, 2008 00:51 ]
Post subject: Re: GTAB Lite BBCODE Tabulator - Generate Graphical Guitar T
Thanks Adrian,
since I play guitar as well (even if recently it is rare that to happen... ) I will try this mod locally.

Thanks for sharing.


moreteavicar [ Wed 16 Apr, 2008 01:04 ]
Post subject: Re: GTAB Lite BBCODE Tabulator - Generate Graphical Guitar T
Thanks all, now you're going to hate me for this... I forgot something in the install instructions!

You must...



#
#-----[ OPEN ]------------------------------------------
#

/includes/bbcode.php


#
#-----[ FIND ]------------------------------------------
#
function process_tag(&$item)
{

global $lang, $board_config, $userdata,

#
#-----[ INLINE AFTER ADD ]------------------------------------------
#

$phpbb_root_path,

#
#-----[ SAVE/CLOSE FILE ]------------------------------------------
#


You should have something like:
global $lang, $board_config, $userdata, $phpbb_root_path, $phpEx;

I'll update the instructions soon...


Mighty Gorgon [ Wed 16 Apr, 2008 01:09 ]
Post subject: Re: GTAB Lite BBCODE Tabulator - Generate Graphical Guitar T
Things that happens...


KasLimon [ Wed 16 Apr, 2008 22:32 ]
Post subject: Re: GTAB Lite BBCODE Tabulator - Generate Graphical Guitar T
Nice mod

Thanks!


moreteavicar [ Thu 17 Apr, 2008 01:46 ]
Post subject: Re: GTAB Lite BBCODE Tabulator - Generate Graphical Guitar T
Thanks Kas, however you downloaded prematurely! I've just updated it


novice programmer [ Fri 18 Apr, 2008 22:49 ]
Post subject: Re: GTAB Lite BBCODE Tabulator - Generate Graphical Guitar T
As MG, I will try that mod in loopback, as I have defenitly closed my icy phoenix webpage. I will open a different one soon...


TheSteffen [ Mon 21 Apr, 2008 22:39 ]
Post subject: Re: GTAB Lite BBCODE Tabulator - Generate Graphical Guitar T
WoW moreteavicar, nthis looks very nice.

Thanks for sharing.


moreteavicar [ Wed 23 Apr, 2008 01:16 ]
Post subject: Re: GTAB Lite BBCODE Tabulator - Generate Graphical Guitar T
Greetz - thanks for the interest - I hope you all can get this working Any probs, just post here. In fact - if its working, why not upload some of your own tab images here! (You need to save image to your hard drive then upload here - you can't link directly to gtab images...).

I'm also working on porting this to phpbb3. The crude method works fine (that is, defining it in ACP) however, this does not work as nice as it does here - that is, if you submit empty tags, here you can get the instructions... impossible in phpbb3 if using ACP entered bbcodes. Also in phpbb3, you are forced to specify number of strings - you can't just leave it empty and let it set a default value - very annoying. As I've already seen in the phpbb3 dev forums... hard-coding bbcodes in phpbb3 is a nightmare!

Anyway time for you all to get back to music_06



NB for anyone visiting demo site - intermittently the server I'm using experiences high loads and the sites timeout - nothing to do with me! (as far as I know!) - its the joy of shared-server hosting!




Powered by Icy Phoenix