We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,163 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Automatically insert a bbcode into phpbb forum post

I am trying to setup a custom image hosting solution for a phpbb forum. I know there are ways to host images on the forum but for my purpose I must use an external website to host the images.

I already have a custom image hosting script written and functioning but I am stuck on what is likely the simplest part. I want the bbcode link to be automatically inserted into the users forum post once they submit their image.

There is currently a company that offers this functionality called postimage.org but in recent years they have started adding adult oriented advertisements to hosted images and I cannot allow this as I have a family oriented forum and that is the last thing my members want to see.

Any help is appreciated.

3
Contributors
5
Replies
5 Days
Discussion Span
5 Months Ago
Last Updated
6
Views
dark_storm83
Newbie Poster
7 posts since Nov 2006
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

This sounds a but tricky.

  1. User uploads their image to your server via the phpBB forum.
  2. php grabs the image file and sends it to your 'image hosting site' - I assum you have an API for this.
  3. php gets the return value (via API) - which could be the image filename or url or the new image.
  4. get the whole shebang into some BBCode.

is that what you're doing?

Perhaps a mod like this?

https://www.phpbb.com/community/viewtopic.php?t=1612565

diafol
Keep Smiling
Moderator
10,662 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,513
Skill Endorsements: 57

That is pretty much exactly what I am trying to do. That is what the old image hosting site did.

I am having trouble with the image hosting side, I am trying to setup the hosting script to send the bbcode back when the user submits their image.

dark_storm83
Newbie Poster
7 posts since Nov 2006
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

You can do the bbcode stuff on your server, you just need the url, don't you?

diafol
Keep Smiling
Moderator
10,662 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,513
Skill Endorsements: 57

Yes the bbcode stuff is done on my server. Just like you said I simply need to return the url of the uploaded image.

dark_storm83
Newbie Poster
7 posts since Nov 2006
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Unless you give more info, I can't see what advice I can offer. What site is hosting the images? What info is returned when you query it / upload an image? Does it have an API?

For example, FLickr's API for uploading can be found here: http://www.flickr.com/services/api/upload.api.html

diafol
Keep Smiling
Moderator
10,662 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,513
Skill Endorsements: 57

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0724 seconds using 2.72MB