Previous Thread
Next Thread
Print Thread
Rate Thread
#220820 07/07/2002 4:14 PM
Joined: Jul 2002
Posts: 16
RTC
Offline
Newbie
Newbie
Offline
Joined: Jul 2002
Posts: 16
Is there any hack which makes it possible for Users to see which post contains an image?
I think I already saw a UBBThreads Board which shows *IMG* at the end of the Subject line to indicate an image within the text (post) body.
If not, is it possible to adapt the NT (no text) hack in such a way that it would work the way I described?
Thanks for any hint.

Sponsored Links
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
I haven't tried this myself, but it could work. Just add the following after line 90 in the file addpost.php (or if you have the NT-hack, add it after the hack):

code:
if (ereg("[{$ubbt_lang['TEXT_IMAGE']}]", $Body)) {
$Subject .= " *IMG*";
}


Joined: Jul 2002
Posts: 16
RTC
Offline
Newbie
Newbie
Offline
Joined: Jul 2002
Posts: 16
Thanks a lot, this is a good start but there are three "little" problems with it:

First problem
I get the *IMG* twice because it is added to the Subject line for the preview and added again for the final post too.
It would look like that:
Subject: My nice car *IMG* *IMG*

Second problem:
The added picture is showed as an attachment only, not within the post (as it should be).

Third problem:
ALL posts show now the *IMG* in the Subject line, even if there is no image attached.

Any hint how to solve the above three problems?
Thanks for any hint.

A last question: is it possible to embed a picture file (a little .gif icon for example) instead of the *IMG*?

Thanks again. Great forum, great helpful people.

Last edited by RTC; 07/09/2002 3:54 PM.
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
Seems that I did multiple things wrong, but since I don't have either my proper computer (with emacs) or my server to try things out I'm a bit handicapped. =] But I'll try to fix it.

First I'll answer question two: This isn't part of the main threads distribution, but you can add this hack which will do it for you.

I don't really know why all posts get *IMG* in the subject, I still think it looks good when I look at it, can't see what the problem is.

If you install the hack mentioned above, you could do the following to get an IMG-string after the subject instead then you will probably not have the same problems. =]

Find the following line in both hacked files:
code:
$TempBod = $Body;



And add these lines right before:
code:

$postrow[$i]['Subject'] .= " *IMG*";



To embed a picture icon insteade, just change the *IMG*-text in the line above to an img-tag, something like this:
code:

$postrow[$i]['Subject'] .= " <img src="/images/image.gif" border="0" alt="Image" />



Joined: Jul 2002
Posts: 16
RTC
Offline
Newbie
Newbie
Offline
Joined: Jul 2002
Posts: 16
Thanks, I'll try it as soon as possible.

Regarding the image embedded in the post: it WORKED before.
Funny. This is REALLY not part of UBBThreads 6.0.2???
Strange, real strange.

Sponsored Links
Joined: May 1999
Posts: 1,715
Addict
Addict
Joined: May 1999
Posts: 1,715
No, it's not a part of the main distribution. Are you sure it worked before, and if it did, hadn't you installed the mentioned hack?

Joined: Jul 2002
Posts: 16
RTC
Offline
Newbie
Newbie
Offline
Joined: Jul 2002
Posts: 16
You're right, it is a hack. The other admin installed it and forgot to tell me.

As soon as I tried what you told me, I'll post the results. Thanks again for helping.

Joined: Oct 2001
Posts: 157
Member
Member
Offline
Joined: Oct 2001
Posts: 157
RTC...any feedback on this hack? I am also looking forward to something like this


Yors Truly

Who? Me? Worry?

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,575
Posts293,931
Members13,824
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,834
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)