Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [------ Post Subject/Message in page title for Kusaba X ------]
- This adds the Subject of a thread to the title of the thread page, if no subject is posted it uses the OP post message (truncated to 50 chars)
- e.g. /b/ - Cocksuckers Thread! or,
- /b/ - Hi /b/, I have a question about why my cock is so s...
- When you see things like *_board_page.tpl, "*" is every template type you use.
- So, let's begin:
- 1. In global_board_header.tpl, remove or comment out:
- <title>{$title}</title>
- 2. Then, *_board_page.tpl, right at the top, add:
- <head><title>{t}{$title}{/t}</title></head>
- 3. Then, in *_thread.tpl, find:
- {if $post.parentid eq 0}
- And right under it, add:
- {strip}
- {if $post.subject neq ''}
- {t}<head><title>/{$board.name}/ - {$post.subject}</title></head>{/t}
- {elseif $post.subject eq '' && $post.message neq "\n"}
- {t}<head><title>/{$board.name}/ - {$post.message|strip_tags|substr:0:50}...</title></head>{/t}
- {else}
- {t}<head><title>/{$board.name}/ - [Image Only]</title></head>{/t}
- {/if}
- {/strip}
- And that's it!
- -Thank jmyeom for the fix for [Image Only], he patched up a line of my suck ^-^
- Let me know if you have any problems at mail@34pchan.org, or find me lurking kusabax.culnet.net/sup/ or 34pchan.org/s/ as either (=^・ェ・^=)!p3l2W3bRxk!!HmZQR2Lwyu or (=^・ェ・^=)!KinuB0nt8M
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement