View Full Version : sug: image post attachment links
Jake Bunce
Sun 7th Oct '01, 5:03am
might be nice if they were displayed within the visual layout of the forums rather than an annonymous white screen. kind of like... "yeah, this image is served from this site".
orca
Sun 7th Oct '01, 8:57am
Yeah, agree with that. And maybe also again a line telling that the forums aren't responsible for the content.
Chen
Sun 7th Oct '01, 9:22am
Yes, nice idea.
Although I think it shouldn't be always displayed that way, only when going to attachment.php?attachmentid=1&showas=page, where just attachment.php?attachmentid=18 will display the image normally (users often attach images and use them for their sigs).
Chen
Sun 7th Oct '01, 10:27am
Ok, I did a little thing.
It's very basic, and doesn't use templates, but you can make it fit to your needs.
In attachment.php, add this:
if ($showpage) {
if ($postid) {
$tolink="postid=$postid";
} else {
$tolink="attachmentid=$attachmentid";
}
echo "<html>\n<head>\n<title>test</title>\n</head>\n<body>\nImage:<br><img src=\"attachment.php?$tolink\">\n</body>\n</html>";
} else {
right before this:
$getforuminfo=$DB_site->query_first("SELECT forumid".
And add "}" right after this:
echo $attachmentinfo[filedata];
And that's basically it. You can go to http://www.forums.com/attachment.php?postid=1&showpage=1 . Change the postbit_attachment template to fix the link.
You can also change the echo to have what you want, etc.
vBulletin® v3.8.0 Beta 3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.