MyBB Hacks

Full Version: Page saving
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Its not a general coding question though, but I think many noobs find it a handy one.

Question is;

When we try to save a MyBB Thread's Page, by CTRL + S , the file name for saving that page in the "Save as" dialog box appears something like that;

"showthread"

Is it possible for us to change this field with "Thread's Title" or "Thread's Subject" name instead of that default "showthread" name ??

Thank You !
A Content-Disposition HTTP header might do it, I don't know, you'll need to check up on that.
Otherwise, using SEO URLs will do it somewhat.
(09-26-2010 09:38 PM)ZiNgA BuRgA Wrote: [ -> ]A Content-Disposition HTTP header might do it, I don't know, you'll need to check up on that.
Otherwise, using SEO URLs will do it somewhat.

SEO URLs save the pages something to: "thread-13.html" (without quotes) Ouch
I want to change it like "Thread's Subject". :-/
Did you check Content-Disposition?
You probably don't want that anyway, since you want to keep a .html extension.
(09-27-2010 07:29 AM)ZiNgA BuRgA Wrote: [ -> ]Did you check Content-Disposition?

Where I could find this ?
I already knew that Yumi. Actually I don't know how to use it with MyBB means where to edit or where to add that code.
Something like this?

HTML Code
<meta http-equiv="Content-Disposition" content="inline; filename=thread_subject" />

I tried this too RateU, but when I tried to save the page (Using this meta tag in showthread template) it write only the first letter of the thread. I mean that e.g. if a thread subject is "Zinga Burga" then it save only "Zinga" and the other letter having an space between the two "Burga" doesn't appear in dialogue box. Ouch
Mmm.... Not quite sure. Maybe you need to put this kind of code in your showthread.php

PHP Code:
header("Content-Disposition: inline; filename=\"" .$thread['subject']. "\"");

Pages: 1 2
Reference URL's