We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

New Module: Title Images

Development and Programming

TechWench's avatar
TechWench
30 posts
18 years ago
TechWench's avatar TechWench

Technically, this is an updated version of the first non-release release of my original title image module. I never fully released it, as it was written quickly during sleep depravation. Old thread about the module (after I had pulled it) is here.

 

What this module does:

* Creates PHP-generated images for titles
* Caches title images
* Stores default values and settings in the database
* Allows variations from the default settings by using tag parameters [size=1](which also makes it backwards compatible with the bass-ackwards first release of this module)[/size]

What you need to install this module:

* Expression Engine (duh)
* PHP (duh, if you're using EE)
* GD with FreeType support

 

The full description with installation instructions and examples for this module can be found here (my website).

A couple of notes:

1) Some servers won’t support all fonts, if you get errors or no images at all, you’ll probably have to find another font. 2) Some fonts don’t have all special characters (i.e. curly quotes), so if you see empty blocks from EE’s special character replacements, you’ll either have to a) find another font, b) hack ee core (or use an extension) to NOT replace text with special characters, or c) reword your titles to not use special characters. 3) Currently, the text image spits out in one long line. I’ll need to research how to add line breaks at X width or X characters. For now, until I can get that done, you’ll have to keep your titles short.

If anyone finds anything buggy or finds ways to improve on this, please let me know!

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
18 years ago
Lisa Wess's avatar Lisa Wess

I think it’s time to update to yours, now. I assume you’ve fixed the issue with it exposing the system directory, or was that someone else’s? Hehe. =)

       
TechWench's avatar
TechWench
30 posts
18 years ago
TechWench's avatar TechWench

Yes I have! :-D Paths are specified by the user, and stored in the database.

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
18 years ago
Lisa Wess's avatar Lisa Wess

I just tried to get the settings for this going, and after entering the information in the Modules page and hitting submit, I got:

Fatal error: Call to undefined function: fatal_error() in /www/username/public_html/system/modules/titleimg/mcp.titleimg.php on line 448

Now when I try to visit the page again to modify the settings, I just get that error.

So.. help. =)

Edit to add - it did submit the details, the table is populated. Just checked.

       
TechWench's avatar
TechWench
30 posts
18 years ago
TechWench's avatar TechWench

Are you using shorthand hex for color (i.e. fff)? Right now, it’s set to accept the full 6-digit hex…

…which begs the question…do I just edit the documentation to instruct users to insert the full 6 digits, or change it to check for 3, and risk people chopping off a digit and getting errors also?

       
TechWench's avatar
TechWench
30 posts
18 years ago
TechWench's avatar TechWench

Oh crap! Nevermind. I forgot to add $this-> to the function….editing.

Well, if that’s the error that’s being produced, there’s likely a problem with the string length, also.

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
18 years ago
Lisa Wess's avatar Lisa Wess

Nope. Using the full 6 digits. Have to for the colors I’m using it for. =) Problem with what string length?

       
TechWench's avatar
TechWench
30 posts
18 years ago
TechWench's avatar TechWench

Okay, updated that stupid typo. Redownload module. Sorry bout that.

I guess I didn’t catch it earlier, as I have been putting in 6-digit hex codes and the error was never called.

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
18 years ago
Lisa Wess's avatar Lisa Wess

Nevermind you’re right. One of the colors only has 5 digits. i thought I copy/pasted it from the color chooser ff extension, must have missed a digit!

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
18 years ago
Lisa Wess's avatar Lisa Wess

It’s still erroring out, same error after uploading the new files. So I can’t fix the color code.

       
TechWench's avatar
TechWench
30 posts
18 years ago
TechWench's avatar TechWench

Okay, I’m gonna have to fix the error reporting to…um…display ON TOP of the settings page, so the settings can still be changed. For now, you can edit the db directly to change the hex.

This is exactly why I need other people to test this stuff out, because this is stuff (I don’t know about you, but) I overlook sometimes! 😉

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
18 years ago
Lisa Wess's avatar Lisa Wess

Edit the db? I haven’t edited a database directly in over a year. How about a quick query to set it to 000000? It’s the font color I screwed up, the rest is ok. =)

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
18 years ago
Lisa Wess's avatar Lisa Wess

Nevermind. I just dropped the module and re-installed it. Working now, it seems. =)

       
Lisa Wess's avatar
Lisa Wess
20,502 posts
18 years ago
Lisa Wess's avatar Lisa Wess

I’m going to have to try this again later. It looked like it utterly tanked my load times, especially after first loading the new titles. But I’m not sure if it’s the module or just general issues, so I’ll test it later tonight. Thanks for making it available. =)

       
TechWench's avatar
TechWench
30 posts
18 years ago
TechWench's avatar TechWench

Okay, I didn’t change the error reporting to be included with the settings form, BUT…I figured out why you’re still erroring out. It turns out, when I uploaded the new files, they didn’t actually upload. I was working with the files locally, and everything looked right. However, when I redownloaded the zip, there were no changes grumble brumble.

So, I re-uploaded…and re-downloaded to doublecheck the changes, and changes are there now.

Attaching the mcp.titleimg.php file, so you don’t have to redownload the zip again.

EDIT: didn’t notice you posted until after I hit submit. 😉

       
1 2 3 Last

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.