{"id":2731,"date":"2008-03-24T14:32:55","date_gmt":"2008-03-24T14:32:55","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/headlines\/"},"modified":"2008-03-25T10:39:09","modified_gmt":"2008-03-25T10:39:09","slug":"headlines","status":"publish","type":"plugin","link":"https:\/\/twd.wordpress.org\/plugins\/headlines\/","author":404743,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.7","stable_tag":"trunk","tested":"","requires":"","requires_php":"","requires_plugins":"","header_name":"Headline","header_author":"Rojoro","header_description":"","assets_banners_color":"","last_updated":"2008-03-25 10:39:09","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/www.rojoro.cn\/","header_author_uri":"http:\/\/www.rojoro.cn","rating":0,"author_block_rating":0,"active_installs":10,"downloads":3796,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["installation","description"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.1"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1566816","resolution":"1","location":"plugin"}},"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[10350,163,4853],"plugin_category":[50],"plugin_contributors":[129485],"plugin_business_model":[],"class_list":["post-2731","plugin","type-plugin","status-publish","hentry","plugin_tags-headlines","plugin_tags-images","plugin_tags-replacement","plugin_category-media","plugin_contributors-rojoro","plugin_committers-rojoro"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/headlines.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/headlines\/trunk\/screenshot-1.png?rev=1566816","caption":""}],"raw_content":"<!--section=installation-->\n<p>IMPORTANT NOTE! As of version 1.4 of the WordPress Plugin Manager, TTF font \nfiles are not allowed elements of plugins. Hence, the bundled font is not \ninstalled correctly. You will need to download the tarball or ZIP file and \ninstall the font into the WordPress installation?s ?wp-content\/image-headlines? \ndirectory. Sorry about that.<\/p>\n\n<p>Your best bet is to first install the WordPress Plugin Manager and then perform \na One-Click installation from there. That?s as simple as it gets. Failing that, \nyou?re welcome to download the files and install the image-headlines.php file in \n'wp-content\/plugins' and the warp1.ttf file in a directory that you create \ncalled 'wp-content\/image-headlines'. That should get everything where it needs \nto go. You?ll then need to visit the plugins page of the WordPress \nadministration and activate the plugin. See, don?t you wish you?d just used the \nPlugin Manager?<\/p>\n\n<p>In order to have your titles turned into images, you have to change how you get \nyour titles! Why? Well, if I went around changing every single invocation of the \ntitle into an image you?d have images in your RSS feeds and anywhere else you \ncall ?the_title()?. You don?t want that. Instead, you tell me which of your \ntitles you want to be images. You do that by editing your template?for instance, \nyour Main Template which generally controls how your home page will look?and \nsearch for the following text:<\/p>\n\n<p>'the_title();'<\/p>\n\n<p>Shouldn?t be hard to find. Make certain that this is the one you want changed, \nit might appear elsewhere in the file. This is the one somewhere after the \n?while (have_posts()) : the_post()? stuff. You?ll change this text to look like \nthis instead:<\/p>\n\n<p>'the_title('_image');'<\/p>\n\n<!--section=description-->\n<p>This plugin allows you to have images created automatically for your entry \ntitles. In this way you can utilize non-standard fonts and get smoother \nrendering than would be possible with simple text headlines. New to this version \nis improved integration with the WordPress administration interface under \nWordPress 1.5 Strayhorn as well as genuine soft-shadows behind the text for that \nsmooth, custom look the girls love.<\/p>\n\n<h3>Using other fonts<\/h3>\n\n<p>The font I?ve included is the lovely Warp 1 by Alex Gollner. If you?d like to \nuse some other font you are more than welcome to do so. First, though, you need \nto get it on the server. So, find yourself a gorgeous TrueType font?preferably \nin Windows format if you have the choice?and stick it on your server. One of the \neasiest ways is to use the built-in WordPress Upload utility. You?ll have to \nallow ttf files to be uploaded which you can change in the miscellaneous tab of \nyour WordPress Options, but once you do that it?s literally just a few clicks to \ninstall the font. Simply click the ?Upload? tab in WordPress administration, \nbrowse to your font (note that Windows is finicky with the file dialog around \nfonts\n you?ll have to right-click on your file and hit ?Properties\n? and copy \nthe filename from the properties and paste it into your file name box in the \n?Open\n? dialog) and upload it! The plugin automatically searches your configured \nupload directory as well as the wp-content\/image-headlines directory for valid \nTrueType fonts and lists those in the menu. Experiment with those fonts!<\/p>\n\n<h3>Configuration<\/h3>\n\n<p>Following installation you?ll likely want to configure the appearance of your \ntitles. Simply go to the Options page of your WordPress installation where \nyou?ll see a new option cunningly called ?Headlines?. Click it.<\/p>\n\n<p>If everything has gone well with the installation you should see a collection of \noptions and a nifty preview image of what your current settings look like. Yeah! \nNote that if your preview image is showing (it should be an image with ?The \nquick brown fox jumped over the lazy dog.? in red letters with a soft gray \nbackground shadow) you are good to go. You?re welcome to customize it however \nyou wish but as far as the plugin is concerned it?s a happy camper.<\/p>\n\n<p>Let?s talk options.<\/p>\n\n<h4>General Configuration<\/h4>\n\n<p>Really if you?re up and running you have nothing much to do here. This just sets \nwhat directory the plugin will use to store the images it generates. You can \nchange it if you wish.<\/p>\n\n<h4>Font and Colors<\/h4>\n\n<p>As you might imagine this section will have the greatest bearing on the \nappearance of your titles. You?ll see a menu containing the list of available \nfonts and entry boxes for controlling the font size and color as well as what \nthe background looks like. Note that all colors you see on this page must be \nspecified in HTML color format, so #123456 or #FF0000 or even the shorthand \nversion like #CCC. Anything else will break in fantastic and undefined ways and \nI will not be pleased if you ask me why your images aren?t showing up and it \nturns out that you have GREEN in the color field. You?ve been warned!<\/p>\n\n<p>If you make your background transparent it will likely look better. Turn the \noption on and off to see the difference.<\/p>\n\n<p>You can have a background image displayed behind your text if you want. I don?t \nuse it much but that?s your call.<\/p>\n\n<h4>Line Spacing<\/h4>\n\n<p>This will control the formatting of your image a bit, especially as it pertains \nto long lines.<\/p>\n\n<p>The left padding simply tells the plugin to leave some blank space at the left \nedge before it starts drawing the text. This may be useful in the case where you \nhave a background image you want to include.<\/p>\n\n<p>You can enable the line-splitting option so that really long titles get split \ninto multiple lines before rendering. This is important on fixed-width \nblogs?like the default Kubrick template in WordPress, for instance?so that you \ndon?t break the appearance if you happen to spout off in your titles like I do. \nSelecting this option will break the text into multiple lines if the rendered \nline would exceed the maximum line width you specify.<\/p>\n\n<p>The vertical space is the additional space you want between each line in the \ncase that we break up lines. The bigger the number the larger the gap between \nthem.<\/p>\n\n<p>The line indent is the additional space between the left border of the image and \nany subsequent lines in the case of a line break.<\/p>\n\n<h4>Shadows<\/h4>\n\n<p>You can turn shadows completely off if you so desire. In which case, simply turn \noff that ?Enable shadow? checkbox. But where?s the fun in that? You have your \nchoice of two shadow styles: soft-shadows and so-called ?classic? shadows. \nHere?s the explanation of both:<\/p>\n\n<h4>Soft Shadows<\/h4>\n\n<p>Soft shadows look like the shadows that Adobe Photoshop generates for you. They \nare generated by drawing the text in the color that you specify in the shadow \ncolor parameter after first offsetting the text by the amounts that you specify \nin the vertical and horizontal offset parameters. Once that?s drawn the entire \nshadow image is blurred mathematically. If you care about the nitty-gritty \ndetails, it performs an approximation of a Gaussian blur using a ?squares? \nconvolution kernel horizontally and vertically across the image, with the size \nof the kernel being based on the ?shadow spread? parameter given. If you don?t \ncare about the nitty gritty, think about blurring your eyes and looking at the \ntext: the amount you blur your eyes is controlled by the ?shadow spread? \nparameter. A small spread means that the shadow will be pretty well defined. A \nlarger spread will mean that the shadow is spread out more and more diffuse (as \nwell as the color tends to fade as the spread increases).<\/p>\n\n<p>PLEASE NOTE that large shadows means many more calculations and many more \ncalculations means it is slower to calculate the final image and making it \nslower means using CPU time on the server and using too much CPU time makes ISP \nadmins cry. Once a particular image for a particular title is created it doesn?t \nhave to be created again, so you don?t have to worry about <em>constantly<\/em> \nperforming this calculation. But, take it from me, if you have a large spread on \na large text size it can take 20 seconds to calculate the shadow for it. And \nthat?s 20 seconds of 99% CPU utilization on the server processor which can \ncreate problems with certain hosts. You?ve been warned again.<\/p>\n\n<h4>?Classic? Shadows<\/h4>\n\n<p>Classic shadows are pretty simple. First, we draw shadow two in the color you \nspecify, and we draw it 2 times the number of pixels you specify in the offset \nparameter down and to the right of where the final text will be drawn. Then we \ndraw shadow one in the color you specify, and we draw it the number of pixels \nyou specify in the offset parameter down and to the right. Then we draw the text \nin your font color right where you want it. The ?exciting? example on this page \nis an example using this method. Using this technique has the advantage that \nit?s fast. Using this technique has the disadvantage that it?s ugly. Okay, not \nugly, just not as elegant and stylish as the soft ones. Then again I?m biased\n I \nwrote the soft shadows and Joel Bennett did the classic ones :) . Nevertheless, \nyou can create some interesting effects with the classic shadows.<\/p>\n\n<h3>Can I use it for things other than titles?<\/h3>\n\n<p>Of course you can!<\/p>\n\n<p>Glad you asked! You can stick this anywhere in your templates?for instance if \nyou want your various category titles rendered?or even in your posts and pages \nlike the one above. First, if you want to put these images in your posts like \nthis?say for fancy dropcaps?you?ll need a very helpful plugin aside from the \nImage Headline plugin. Go and find the RunPHP plugin. Install it. Then, wherever \nyou want your text to appear, put in a call to the following function (if in a \npage or post, be sure to enable the ?eval() Content? option):<\/p>\n\n<p>''<\/p>\n\n<p>Where the ?formats? string is a list of formats that you want to override \nseparated by ampersands (&amp;). Anything you don?t specify will be set exactly as \nit is for your entry titles. Each format will be in the form of \n?format_name=value? where ?format_name? is defined as follows:<\/p>\n\n<ul>\n<li>font_file ? Full path to the TrueType font you want to use.<\/li>\n<li>font_size ? The size in points to draw the text.<\/li>\n<li>font_color ? The color in HTML format either full (#FF0000) or brief (#F00).<\/li>\n<li>background_color ? The color of the background that the image will be<br \/>\ndisplayed over in the same format as above.<\/li>\n<li>shadow_color ? If soft shadows are on?which follows the main setting in your \nOptions page?this controls what color to draw the shadow.<\/li>\n<li>shadow_spread ? If soft shadows are on this controls the spread in pixels.<\/li>\n<li>shadow_vertical_offset ? Controls how many pixels down to draw the shadow.<\/li>\n<li>shadow_horizontal_offset ? Controls how many pixels to the right to draw the<br \/>\nshadow.<\/li>\n<li>left_padding ? Number of pixels from the left edge to start drawing the text.<\/li>\n<li>max_width ? The maximum width in pixels allowed before the text is broken into<br \/>\nmultiple lines.<\/li>\n<li>space_between_lines ? The number of pixels between the bottom of the previous<br \/>\nline and the top of the next line for multiline images.<\/li>\n<li>line_indent ? The additional number of pixels to indent subsequent lines in<br \/>\nmultiline images.<\/li>\n<li>shadow_first_color ? The color to draw the first of the ?classic? shadows if<br \/>\nsoft-shadows are not enabled.<\/li>\n<li>shadow_second_color ? The color to draw the second of the ?classic? shadows<br \/>\nif soft-shadows are not enabled.<\/li>\n<li>shadow_offset ? If using ?classic? shadows, the number of pixels separating<br \/>\nthe shadows from the main text and each other.<\/li>\n<li>background_image ? An image to draw under the text in the background.<\/li>\n<\/ul>\n\n<p>So, if I want to set the font color to red, the size to 20 points, and the<br \/>\nshadow spread to 5 pixels the format string would be:<\/p>\n\n<p>'font_color=#F00&amp;font_size=20&amp;shadow_spread=5'<\/p>","raw_excerpt":"This plugin allows you to have images created automatically for your entry titles. In this way you can utilize non-standard fonts and get smoother r &hellip;","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/2731","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=2731"}],"author":[{"embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/rojoro"}],"wp:attachment":[{"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=2731"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=2731"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=2731"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=2731"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=2731"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/twd.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=2731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}