Page saving
Imran Offline
Member
***
Posts: 204
Joined: Apr 2010
Post: #1
Page saving
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 !

[Image: logo.png]

[Image: twitter.png]
09-26-2010 05:44 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Page saving
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.

My Blog
09-26-2010 09:38 PM
Find all posts by this user Quote this message in a reply
Imran Offline
Member
***
Posts: 204
Joined: Apr 2010
Post: #3
RE: Page saving
(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". :-/

[Image: logo.png]

[Image: twitter.png]
09-26-2010 10:43 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #4
RE: Page saving
Did you check Content-Disposition?
You probably don't want that anyway, since you want to keep a .html extension.

My Blog
09-27-2010 07:29 AM
Find all posts by this user Quote this message in a reply
Imran Offline
Member
***
Posts: 204
Joined: Apr 2010
Post: #5
RE: Page saving
(09-27-2010 07:29 AM)ZiNgA BuRgA Wrote:  Did you check Content-Disposition?

Where I could find this ?

[Image: logo.png]

[Image: twitter.png]
09-29-2010 06:50 PM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #6
RE: Page saving
http://lmgtfy.com/?q=Content-Disposition+HTTP+header+

My Blog
09-29-2010 07:26 PM
Find all posts by this user Quote this message in a reply
Imran Offline
Member
***
Posts: 204
Joined: Apr 2010
Post: #7
RE: Page saving
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.

[Image: logo.png]

[Image: twitter.png]
09-30-2010 01:05 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #8
RE: Page saving
Something like this?

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


(This post was last modified: 09-30-2010 03:35 AM by RateU.)
09-30-2010 03:33 AM
Find all posts by this user Quote this message in a reply
Imran Offline
Member
***
Posts: 204
Joined: Apr 2010
Post: #9
RE: Page saving
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

[Image: logo.png]

[Image: twitter.png]
09-30-2010 05:28 AM
Visit this user's website Find all posts by this user Quote this message in a reply
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #10
RE: Page saving
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']. "\"");


(This post was last modified: 09-30-2010 07:26 AM by RateU.)
09-30-2010 06:27 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: