Will inline image attachments display on the portal?
Will inline image attachments display on the portal?
Hi,
I've been looking around for portals for a while now, and there seems to be a problem with inline attachment images displaying on the front pages of the portal when posts from a news forum are displayed on the portal. I was wondering if that is a problem in Board3portal?
tl;dr Will inline image attachments display on the portal news posts?
thanks.
I've been looking around for portals for a while now, and there seems to be a problem with inline attachment images displaying on the front pages of the portal when posts from a news forum are displayed on the portal. I was wondering if that is a problem in Board3portal?
tl;dr Will inline image attachments display on the portal news posts?
thanks.
-
- Site Admin
- Posts: 2989
- Joined: 7. January 2006 20:11
- phpBB.de User: Saint
- phpBB.com User: Saint_hh
- Location: Hamburg
- Contact:
Re: Will inline image attachments display on the portal?
Not yet.
Maybe we'll implement this feature before the final release, but we'll see.
Maybe we'll implement this feature before the final release, but we'll see.
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~
Kein Support per PN / No support via PM!
Kein Support per PN / No support via PM!
Re: Will inline image attachments display on the portal?
Hi,
thanks for the reply. I guess this must be pretty tricky, since no portal can get it working.
I'll keep looking, maybe I'll be back again
thanks for the reply. I guess this must be pretty tricky, since no portal can get it working.
I'll keep looking, maybe I'll be back again
Re: Will inline image attachments display on the portal?
I was asking for this before and couldn't find any. But hey, now you can do it. Check out this this topic from phpbb. Attached images can be displayed with the news. Or as a gallery too.magnusm wrote:Hi,
thanks for the reply. I guess this must be pretty tricky, since no portal can get it working.
I'll keep looking, maybe I'll be back again
Cheers,
-
- Site Admin
- Posts: 2989
- Joined: 7. January 2006 20:11
- phpBB.de User: Saint
- phpBB.com User: Saint_hh
- Location: Hamburg
- Contact:
Re: Will inline image attachments display on the portal?
Awesome hewitt!
Many thanks for sharing this!
As i had a quick look: it's limited to images?
(Moved topic to: Blocks - In Development)
Many thanks for sharing this!
As i had a quick look: it's limited to images?
(Moved topic to: Blocks - In Development)
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~
Kein Support per PN / No support via PM!
Kein Support per PN / No support via PM!
Re: Will inline image attachments display on the portal?
Yes, it only displays images. Such as jpg, jpeg, gif, png, bmp. Other types of images can be added on
Re: Will inline image attachments display on the portal?
Any progress?
Re: Will inline image attachments display on the portal?
I've finally managed to bring up inline attachment functionality, so happy
Now I'm going to post this mod here.....
Now I'm going to post this mod here.....
Re: Will inline image attachments display on the portal?
Hope this code will bring inline attachments to your portal, guys.
1. OPEN
/portal/includes/functions.php
2. FIND
3. BEFORE ADD
4. FIND
5. BEFORE ADD
Well...that's it. Please correct me if it still wont working.
1. OPEN
/portal/includes/functions.php
2. FIND
Code: Select all
$posts[$i]['bbcode_uid'] = $row['bbcode_uid'];
$len_check = $row['post_text'];
Code: Select all
// Pull attachment data
$sql2 = 'SELECT *
FROM ' . ATTACHMENTS_TABLE . '
WHERE `post_msg_id` = '. $row['post_id'] .'
AND in_message = 0';
$result2 = $db->sql_query($sql2);
while ($row2 = $db->sql_fetchrow($result2))
{
$attachments[] = $row2;
}
$db->sql_freeresult($result2);
Code: Select all
$message = smiley_text($message); // Always process smilies after parsing bbcodes
Code: Select all
if (!empty($attachments))
{
parse_attachments($row['forum_id'], $message, $attachments, $update_count);
}
-
- Site Admin
- Posts: 2989
- Joined: 7. January 2006 20:11
- phpBB.de User: Saint
- phpBB.com User: Saint_hh
- Location: Hamburg
- Contact:
Re: Will inline image attachments display on the portal?
Wow - that's cool, thank you very much for sharing this!
I'll test it soon.
Do you have already a demo of the working code?
I'll test it soon.
Do you have already a demo of the working code?
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~
Kein Support per PN / No support via PM!
Kein Support per PN / No support via PM!
Re: Will inline image attachments display on the portal?
Sorry, but I prefer not to share my portal address. It would not show much anyway. But this code is working for me.
This code is taken from viewtopic.php and adapted for portal view. In other words it just makes portal to treat attachments the forum natural way. The main difference is that viewtopic.php operates with an array of posts instead of one at a time.
You could search through viewtopic.php for "// Pull attachment data"
and "parse_attachments($forum_id, $message, $attachments[$row['post_id']], $update_count);"
This code is taken from viewtopic.php and adapted for portal view. In other words it just makes portal to treat attachments the forum natural way. The main difference is that viewtopic.php operates with an array of posts instead of one at a time.
You could search through viewtopic.php for "// Pull attachment data"
and "parse_attachments($forum_id, $message, $attachments[$row['post_id']], $update_count);"
Re: Will inline image attachments display on the portal?
It works, but for some odd reason the attachments are in a reverse order on the portal. :/
Board3 Portal Dev & English Tech Support
Re: Will inline image attachments display on the portal?
Try to play around with mysql query from Step 3.
Adding "DESC" directive may fix that problem.
P.S. I have an incremental in ACP attachment order settings.
Adding "DESC" directive may fix that problem.
P.S. I have an incremental in ACP attachment order settings.
Last edited by connect on 11. August 2008 07:23, edited 1 time in total.
-
- Site Admin
- Posts: 2989
- Joined: 7. January 2006 20:11
- phpBB.de User: Saint
- phpBB.com User: Saint_hh
- Location: Hamburg
- Contact:
Re: Will inline image attachments display on the portal?
Yes, correct. He already added it.
http://board3deportal.svn.sourceforge.n ... athrev=286
Thanks again, connect, to point out this solution!
http://board3deportal.svn.sourceforge.n ... athrev=286
Thanks again, connect, to point out this solution!
~~~ They say the definition of madness is doing the same thing and expecting a different result ~~~
Kein Support per PN / No support via PM!
Kein Support per PN / No support via PM!
Re: Will inline image attachments display on the portal?
Maybe it's better to check that ACP option before mysql request?