eon
12-14-2005, 11:51 AM
I finished my hack "Add text".
You can download the files as a zip-file here:
http://www.northing.nl/programs/pixelpost_1.4.3_add_text.zip
or as a tar.gz-file here
http://www.northing.nl/programs/pixelpost_1.4.3_add_text.tar.gz
When Pixelpost 1.5 is coming out I hope I can change this hack to an Addon.
About the function:
This is Pixelpost 1.4.3 with an Add Text function. The function allows you to write an introduction-text before a serie of photo's. The function will make a thumbnail of this introduction-text.
http://tweakers.net/ext/f/5957b50d0959c640efa3e7b9e6d44839/full.jpg
You can configure the thumbnail on the following points:
Image configuration (jpg)
The function will make an image of the text. From the image you can make the thumbnail for your introduction.
- Image height
- Image width
- Image quality
Fonts
- Fontdirectory
- Font type title
- Font type text
The font size. Depending on your version of GD, this should be specified as the pixel size (GD1) or point size (GD2).
- Font size title
- Font size text
- Background color
- Title color
- Text color
X and Y position of the title and text.
- X position title
- Y position title
- X position text
- Y position text
- Max. text width
The angle in degrees, with 0 degrees being left-to-right reading text. Higher values represent a counter-clockwise rotation. For example, a value of 90 would result in bottom-to-top reading text.
- Rotate title
- Rotate text
About the database changes:
I added some extra fields in the table pixelpost_config ("pixelpost_" can be something different). This fields will be insert in the table when you configure the function for the first time.
Extra fields in pixelpost_config:
- fontdir
- fonttype_title
- fonttype_text
- fontangle_title
- fontangle_text
- font_height_title
- font_height_text
- bg_color
- title_color
- text_color
- x_pos_title
- y_pos_title
- x_pos_text
- y_pos_text
- maxtextwidth
- image_h
- image_w
- quality
I added a field "type" in pixelpost_pixelpost.
0 are images.
1 are text-images.
This field will be insert in the table when you configure the function for the first time.
There is a possibility to insert more kinds of media like video, audio or flash. What you need to do is create a new template and add a new template switch in index.php at row 150 "//Template switch choose template (image=0, text=1)". After that the only thing to do is to build the backoffice of the media.
About new files:
- \addons\add_text.php - to configure the image for the thumbnail
- \admin\fonts - example directory to store your fonts (including verdana.ttf and verdana_bold.ttf)
- \templates\pixelpost-light\text_template.html - template to show text
About changed files (for example here a few things that have been changed):
- \index.php - added a template switcher (row 150), moved some lines
- \admin\index.php - changed the menu (row 237), added "Edit text" (row 693), added "Post a new text" (row 1171)
- \includes\functions.php - added the "texttoimage"-function
- \includes\12cropimageinc.php - added "kickto" (rows 38 and 43)
- \includes\12cropimageincscripts.php - added "kickto" (rows 31 and 69)
- \templates\pixelpost-light\image_template.html - added <span class='text'><IMAGE_NOTES></span>
- \templates\pixelpost-light\pixelpost-light.css - added ".text" (row 118), added "#text-info" (row 172)
You can download the files as a zip-file here:
http://www.northing.nl/programs/pixelpost_1.4.3_add_text.zip
or as a tar.gz-file here
http://www.northing.nl/programs/pixelpost_1.4.3_add_text.tar.gz
When Pixelpost 1.5 is coming out I hope I can change this hack to an Addon.
About the function:
This is Pixelpost 1.4.3 with an Add Text function. The function allows you to write an introduction-text before a serie of photo's. The function will make a thumbnail of this introduction-text.
http://tweakers.net/ext/f/5957b50d0959c640efa3e7b9e6d44839/full.jpg
You can configure the thumbnail on the following points:
Image configuration (jpg)
The function will make an image of the text. From the image you can make the thumbnail for your introduction.
- Image height
- Image width
- Image quality
Fonts
- Fontdirectory
- Font type title
- Font type text
The font size. Depending on your version of GD, this should be specified as the pixel size (GD1) or point size (GD2).
- Font size title
- Font size text
- Background color
- Title color
- Text color
X and Y position of the title and text.
- X position title
- Y position title
- X position text
- Y position text
- Max. text width
The angle in degrees, with 0 degrees being left-to-right reading text. Higher values represent a counter-clockwise rotation. For example, a value of 90 would result in bottom-to-top reading text.
- Rotate title
- Rotate text
About the database changes:
I added some extra fields in the table pixelpost_config ("pixelpost_" can be something different). This fields will be insert in the table when you configure the function for the first time.
Extra fields in pixelpost_config:
- fontdir
- fonttype_title
- fonttype_text
- fontangle_title
- fontangle_text
- font_height_title
- font_height_text
- bg_color
- title_color
- text_color
- x_pos_title
- y_pos_title
- x_pos_text
- y_pos_text
- maxtextwidth
- image_h
- image_w
- quality
I added a field "type" in pixelpost_pixelpost.
0 are images.
1 are text-images.
This field will be insert in the table when you configure the function for the first time.
There is a possibility to insert more kinds of media like video, audio or flash. What you need to do is create a new template and add a new template switch in index.php at row 150 "//Template switch choose template (image=0, text=1)". After that the only thing to do is to build the backoffice of the media.
About new files:
- \addons\add_text.php - to configure the image for the thumbnail
- \admin\fonts - example directory to store your fonts (including verdana.ttf and verdana_bold.ttf)
- \templates\pixelpost-light\text_template.html - template to show text
About changed files (for example here a few things that have been changed):
- \index.php - added a template switcher (row 150), moved some lines
- \admin\index.php - changed the menu (row 237), added "Edit text" (row 693), added "Post a new text" (row 1171)
- \includes\functions.php - added the "texttoimage"-function
- \includes\12cropimageinc.php - added "kickto" (rows 38 and 43)
- \includes\12cropimageincscripts.php - added "kickto" (rows 31 and 69)
- \templates\pixelpost-light\image_template.html - added <span class='text'><IMAGE_NOTES></span>
- \templates\pixelpost-light\pixelpost-light.css - added ".text" (row 118), added "#text-info" (row 172)