topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday March 19, 2024, 6:36 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: new forum feature coded - ability to inline link attachments!  (Read 161287 times)

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
i have just finished some modifications to the forum software to allow inline insertion of attachments (images,etc.).  This should help a lot in posts where the text refers to images a lot and you used to have all the attached images just shown at the footer of the post.

All of the images you see here are ATTACHMENTS to this post, not hosted on other sites :)


The new feature supports a bunch of different tags that let you control how images are displayed:

[attach=1][/attach] says insert normal attachment #specified there
(ie will be url link if non image, or default img or thumbnail based on server settings).
for example, [attach=1][/attach] shows attachment #1 image here:

RoxiFelix.jpg

[attachtimg=#] says insert full image even if server is set to
 show thumbnails by default.  Here is attachment #2 image forced to full size here, [attachimg=2][/attachimg]:

DonationCoderswLogoSmall.gif


[attachturl=#] says insert url link even if the attachment is an image
(useful if you want to attach images as simple url download links but not show
them as pictures anywhere in post).  For example here is [attachurl=1][/attachurl]:

* RoxiFelix.jpg (61.16 kB. 499x463 - viewed 6829 times.)



[attachthumb=2][/attachthumb] says to insert a thumbnail of the image, EVEN if thumbnailing
 is off by default on server (like it is here).  For example here is [attachthumb=1][/attachthumb]:

Here : RoxiFelix.jpgnew forum feature coded - ability to inline link attachments!




NOTE:
  • You will now find a new combo box on the Post page that says "Link Inline Image.." which will insert common codes for showing attached inline images in different styles.
  • All attachments which are inlined are automatically excluded from listing down at bottom footer
  • All attachments which are not inlined are shown at footer as per normal (see below for attachment 3 which was never inlined above so is shown in footer as normal).
« Last Edit: August 21, 2011, 01:48 PM by mouser, Reason: updated with info about combo box for inline attachments »

nudone

  • Cody's Creator
  • Columnist
  • Joined in 2005
  • ***
  • Posts: 4,119
    • View Profile
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #1 on: January 03, 2006, 04:25 AM »
a fantastic improvement.

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,066
    • View Profile
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #2 on: January 03, 2006, 04:35 AM »
Looks great - a really useful mod. Are you going to package it as a mod for SMF forums or keep it to this board?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #3 on: January 03, 2006, 05:59 AM »
all mods we make for this forum are intended to be shared with the smf community - it's the least we can do as appreciation to the great work the smf people have done.

in fact i've set up a special page for all of our smf modifications: https://www.donation...r/SmfMods/index.html

i have to update that page but also find an smf pro who can make nice proper "packages" out of my modifications since i'm not too good at that.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #4 on: January 03, 2006, 06:00 AM »
ps.
i've also added a new "drop down box" to the post editor (upper left and colors) that will insert [ Invalid Attachment ] tags for you so you don't have to remember the syntax.

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,149
    • View Profile
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #5 on: January 03, 2006, 07:30 AM »
>  to allow inline insertion of attachments (images,etc.). 

-
[a tt ach img = 1 ] https://www.donation...m/cssimages/CX4m.gif

results in
[ Invalid Attachment ]https://www.donation...m/cssimages/CX4m.gif


Test CODE block
[attachimg=1][/attachimg]https://www.donationcoder.com/cssimages/CX4m.gif

-
-


Iam pretty sure i will like this  ;D
THX
« Last Edit: January 03, 2006, 12:15 PM by Stefan »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #6 on: January 03, 2006, 07:37 AM »
stefan - you must replace the # with the attachment #.

for example:
[attach=1][/attach]

i will modify the error to make clear what is wrong.

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,149
    • View Profile
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #7 on: January 03, 2006, 07:46 AM »
[ Invalid Attachment ]H:\1to\neueHTMLhilfe\Ascii.jpg

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #8 on: January 03, 2006, 07:49 AM »
hehe you'll get it, keep trying.

Carol Haynes

  • Waffles for England (patent pending)
  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 8,066
    • View Profile
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #9 on: January 03, 2006, 07:56 AM »
Here is a test

stefan.png

Stefan's avatar should appear above this line ...

This is the code I used:

Here is a test

[attachimg=1][/attachimg]

Stefan's avatar should appear above this line ...

Goodie seems to work for me.

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,149
    • View Profile
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #10 on: January 03, 2006, 08:00 AM »
Hmm, I use [att achimg=1].
I copy this in an CODE block for you, see above.


--
Edit:
this syntax of me was wrong!
See pic below for the right one.
« Last Edit: January 03, 2006, 08:17 AM by Stefan »

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,149
    • View Profile
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #11 on: January 03, 2006, 08:03 AM »
--

w3c_home.gif

--
EDIT: added an how to:



I would have attached screenshots but I can't figure out how.

0) how to make scrennshots you know? Use the Print-Key, then paste it into MS-Paint, modify/add circles/crop, then save as e.g. att001.png
1) use the "full" post mode , not the "Quick Reply" one. This means use the "Quote"-button at top of the post or the "Reply"-Button at end of the thread.
2) choose e.g. "Link Inline Image" from post 'menu'
3) choose 'Inline display attachement'
4) you will get [at tach = #]
5) change the # to digit 1 [att ach = 1] (without space!)
6) see under the post window the "Attach" box ...below of "Additional Options..." .
...point it to your att001.png  .... your first attachment will be seen at the place of [att ach = 1] (use it without this spaces!)


See a picture where the Quote/Reply -Buttons are located:

DC-Attach-Image01-useReply-2.png

Note from user "tomos":
alternatively,
if you start in Quick Reply, click on Preview - that will bring you into "full" mode
-tomos


==================================================


See a picture how this work:

DC-Attach-Image02-howTo-2.png


==================================================


This picture shows you how to delete an attachment:

DC-Attach-Image03-delete.PNG



==================================================

Tip1:
use PNG as file typ.
Before saving
- add with Paint or Xnview an circle or an arrow to point to that you wanna show
- crop the image to the main part to decrease the file size
- try to decrease the color depth with Xnview, IrfanView or PhotoFiltre to ~ 16 colors, this decrease the file size.

See a picture about some basic Paint features:


DC-Attach-Image04--usePaint_2.PNG



MS Paint Tutorials / How-to:
http://www.lkwdpl.or...s/MSPaint/paint.html
http://www.albinobla...com/tutorial/mspaint
http://www.lesley.ed...y/ahunt/MSPttutr.htm


==================================================


Tip2:
Try DonationCoders own Screenshot tool Screenshot Captor from
https://www.donation...hotcaptor/index.html



Tip3:
you can also attach an file without the use of [att achimg=#], then the image
is attached as thump at the very end of the post, like this white-one-with-text below.


-
HTH someone?
Please donate to DonationCoder.com.
« Last Edit: July 29, 2007, 10:43 AM by AbteriX »

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,149
    • View Profile
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #12 on: January 03, 2006, 08:11 AM »
Attach-Images.png  ---> this will display your first attached picture, wich you have attach with "Additional Options..." below.
[ Invalid Attachment ] ---> your second attached picture from "Additional Options..." below.
...

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,149
    • View Profile
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #13 on: January 03, 2006, 08:15 AM »
I Got it ?!

But i found an error with
"tried to inline include (attachimg) attachment #1"

'cus this is my second attach-image-command
 in this post wich is  failed to include,
i.e. it must be #2 instead of #1 ? Isn't it?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #14 on: January 03, 2006, 08:18 AM »
yes your second image would be included like: [attach=2][/attach]

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,149
    • View Profile
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #15 on: January 03, 2006, 09:55 AM »
yes your second image would be included like: [attach=2,msg13503][/attach]


Please see my post from:
« Reply #12 on: Today at 14:11:24 »

- my first image (#1) was  attached, no problem here.


- but your error speaks still about #1 => " tried to inline include (attachimg) attachment #1 "
But #1 was attached.

This error message must reffer to #2
'cus i had no second image attached in "Additional Options... ",
i had only wrote the command [att achimg2]


Am i wrong?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #16 on: January 03, 2006, 10:02 AM »
stefan can you make a post somewhere that demonstrates the problem so i can understand better.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #17 on: January 03, 2006, 10:15 AM »
never mind stefan, i see what you were saying and fixed it.
the error now refers to the proper attachment # you specified (see your post above now, the error is correct).

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,149
    • View Profile
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #18 on: January 03, 2006, 12:12 PM »
.
-
=

DaumenHoch.jpg

=
-
.


Fine, good work  :Thmbsup:

AbteriX

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 1,149
    • View Profile
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #19 on: January 03, 2006, 12:25 PM »
Suggestion:


"You need to specify the attachment number, for example [att achimg=1]."


should be smg like:

"
You need to exchange the '#' with the related attachment number from the "Additional Options..." below,
for example use [att achimg=1] for to see the first attachment inline the post, '=2' for the second...
"


 :( ?

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #20 on: January 03, 2006, 12:27 PM »
good idea; i will make it so.

clif_notes

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 199
  • Clif Notes Newsletter
    • View Profile
    • Clif Notes Newsletter
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #21 on: January 03, 2006, 11:47 PM »
Screenshot - 1_2_2006 , 1_28_03 AM.pngnew forum feature coded - ability to inline link attachments!

Nice feature.  :up: :up:

Devoted to promoting freeware and free information

hohar

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #22 on: August 28, 2006, 03:12 PM »
I was just referred to your mod from SMF.  i'm really interested in getting this inline attachment thing working.  i seemed to have to have it working somewhat, but i feel i did something wrong during the modification of the php file you suggest.

first of all, does this mod work with SMF 1.1 RC3?

in your install, you say to look for a certain code in the display.template.php file.  i'm assuming this is in the themes/default folder and there should be a copy in the folder for the specific theme you are using.  is this right?

also, you state where you should start inserting the code you have written.  i'm confused by your instructions.  you say to look for the code starting with "// What about splitting it off the rest of the topic?"

then you list 2 more blocks of code.  then you say your code should replace the code inbetween those 2 blocks of code.....but didn't you list 3 blocks?  i'm not really up to snuff on php, so i don't really know.

i'm just trying to figure out exactly where to start inserting your code and what of the original code i should delete.

i tried inserting your code after the block of code following "// Show a checkbox for quick moderation?" and before "// Show "« Last Edit: Time by Person »" if this post was edited.".  with this code in place in a display.template.php file copied to the theme folder i was using in my forum, the inline attachments seemed to work.  however, i didn't see any drop down menus like in the screen capture above when i was posting the topic.  also, once posted, the image was inline and the formating was off below it.  specifically, the "report to moderator" and "show ip address" fields were locate way out of the area defined for the topic.

do you have any idea as to what i'm doing wrong? 

thanks,

ryan
« Last Edit: August 28, 2006, 03:14 PM by hohar »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #23 on: August 29, 2006, 04:57 PM »
Hi hohar and welcome.  I can try to help.

First of all note that the modification is for RC2 and hasn't been upgraded to RC3 yet, but it will be identical or nearly identical and should not be a problem at all.

Second, we use the mod every day here over and over, so it is very stable and works well.

Third, i've made a few improvements that I haven't posted yet - if you give me a week I can try to upload a new version, perhaps ready for RC3.  But that shouldn't stop you from tying to get current version installed since it will be easy to change.

Fourth, with regard to:

with this code in place in a display.template.php file copied to the theme folder i was using in my forum, the inline attachments seemed to work.  however, i didn't see any drop down menus like in the screen capture above when i was posting the topic.

the drop down menu items are very optional - we use them here in a couple of places just to help remind people what they can do.  i can post the code for some of them if you like.  basically the ONLY thing they do is add to the post stuff like
[attachthumb=1][/attachthumb]
in case the user has forgotten what keyword to use for thumbnails, etc.  basically it's just a reminder helper so the user doesnt have to remember what to type.  That's all it doest.

As for this:
also, once posted, the image was inline and the formating was off below it.  specifically, the "report to moderator" and "show ip address" fields were locate way out of the area defined for the topic.

That's a little trickier since we use a slightly non-standard template, however it really shouldnt look ANY different at all - after all the whole point is for inline images to be in the text and not effect the post otherwise.

Maybe you could post a screenshot or email me ([email protected]) so i can help a bit more.


Stern

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 5
    • View Profile
    • Donate to Member
Re: new forum feature coded - ability to inline link attachments!
« Reply #24 on: October 19, 2006, 05:33 AM »
the drop down menu items are very optional - we use them here in a couple of places just to help remind people what they can do.  i can post the code for some of them if you like.  basically the ONLY thing they do is add to the post stuff like
[attachthumb=1,msg34844][/attachthumb]
in case the user has forgotten what keyword to use for thumbnails, etc.  basically it's just a reminder helper so the user doesnt have to remember what to type. 

mouser, sorry my bad english.

Can I get this code - drop/down menu for my site?