[TIP/TRICK] Tinypic Image Upload Popup on Post/Reply Page

Started by brandonroy, January 24, 2009, 11:20:16 PM

Previous topic - Next topic

gbsothere

Is this different than the TinyPic mod mentioned on the thread below?

I posted this concern on the thread for that mod here:

http://www.simplemachines.org/community/index.php?topic=314047.msg2139031#msg2139031

but the threadstarter seems to have abandoned the thread.   

If I use your downloads and coding, do I need to remove that TinyPic mod, first and will using your version eliminate the issue seen on the two screenshots I've posted on the thread I referenced above?

Thanks to brandonroy or to anyone else who can answer this. 

My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

brandonroy

gbsothere, I don't know about that other Tinypic mod and I haven't seen it in action - But you shouldn't have a problem with my version!

If you do use mine, there's no need for the one you have installed, so uninstall it if you do!

gbsothere

Quote from: brandonroy on July 02, 2009, 03:18:11 PM
gbsothere, I don't know about that other Tinypic mod and I haven't seen it in action - But you shouldn't have a problem with my version!

If you do use mine, there's no need for the one you have installed, so uninstall it if you do!



Thanks so much, brandonroy.  The other one is a bit glitchy (as you might have seen on that link I gave) and I believe that yours might just be the fix I'm looking for. 

*off to make it happen*

Thanks, again.

My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

gbsothere

It works great, brandonroy, so much less problematic than the one I had.  Thanks!  :)
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.


1Chope

Quote from: Shadow1243 on July 05, 2009, 10:49:11 AM
Any chance of automatically inserting the code after upload?

Yeah It will be better,
Any Chance?

jGEE

i'm new at this and kinda confused... Please help: where did i go wrong. i am using SMF 1.1.9. thank you joe  :'(

echo '<img src="', $settings['images_url'], '/bbc/divider.gif" alt="|" style="margin: 0 3px 0 3px;" />';
            $found_button = false;
         }
      }
        echo '&nbsp;&nbsp;<a onclick="window.open(\'hxxp:hotrodgossip.org/tinypic.html%5C',%5C'POPUP%5C',%5C'width=280,height=540,scrollbars=0%5C');return [nonactive] false;" href="#"><img src="hxxp:hotrodgossip.org/memberimages/uploadimage.gif [nonactive]" border="0"></a>';
      echo '
            </td>
         </tr>';
   }

   // Now start printing all of the smileys.
   if (!empty($context['smileys']['postform']))

gbsothere

#28
Joe, I don't see your forum showing up in your links, just your main link.  For instance, if your forum directory is "smf" then that first link should be 'http://hotrodgossip.org/smf/tinypic.html\ and, again, if your forum directory is "smf" and say, for instance, you're using the default theme, then the next link to your image will be
<img src="http://hotrodgossip.org/smf/Themes/default/images/uploadimage.gif"

tinypic.html should be placed in smf's root directory, not hotrodgossips.org's root directory and your link should point to that.  uploadimage.gif should be placed in your theme's image folder and the link should point to that.  And, of course, Post.template.php should be put in your theme's directory.

Example:  smf---->tinypic.html
Example:  smf---->Themes--->default---->images---->uploadimage.gif
Example:  smf---->Themes---->default---->Post.template.php

(You'd have to change all that to the name of your forum's directory if it's not "smf" and to your own theme if it's not "default".)

Do you not have your forum in separate directory (like smf)?
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

jGEE

gbsothere -thank you very much!
I have a lot to learn but it is fun when i make a ton of mistakes then wyolla~ it works, lol.
I appreciate your help and will post back the results. I'm going to give it a shot! thanks again joe  :)

jGEE

Sorry for being such a putz but it would be nice if i could this this mod on my forum. I think i have everything in the correct place but the image button does not show in the post box. Maybe i didnot post the php code in the correct place???
i would appreciate any additional help








gbsothere

I'm sitting here staring at it, Joe and it looks as if everything's exactly where it should be.  Your links look good, your tinypic.html is in smf's root directory, Post.template.php looks parsed correctly and is in the default folder, uploadimage.gif is in default's images folder.   *stumped* 

Here is the link for your image and, as you can see, it's there:

http://hotrodgossip.org/simplemachinesforum/Themes/default/images/uploadimage.gif

This is what it looks like in the reply area (different forums look different, but the image, itself, looks like this): 


I would suggest completely clearing the cache in your browser or even trying it in a different browser to see if that changes anything.  If not, then, hopefully, someone will come by with an "aha!" moment.    I hope this is resolved for you, Joe, because it really is a good mod and your posters will enjoy it.




My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

jGEE

gbsothere i appreciate your help. Normally i use Firefox, so i tried IE -the button is just not there maybe the mod does not work with version 1.1.9.

i can paste the hxxp:hotrodgossip.org/simplemachinesforum/tinypic.html [nonactive] in my browser and up comes the Tinypic box, even uploads a pic and the code works in a post -the mod just doesn't show up in my forum.

thank you again, joe

Anyone else have and solutions or reason why i can't get this mod to work?

gbsothere

#33
I have 1.1.9., Joe, and it works well for me....   I tell you, I'm really stumped.  It may end up being something so obvious that we'll both feel like dummies.  *grin*

The parsing looks fine to me.  Unless you have other mods that use Post.template.php and may be interfering, I can't think why it wouldn't work.  You might get a fresh copy of Post.template.php from the default folder of the smf zip that you downloaded when you installed your forum (or upgraded to 1.1.9) and try the parse again on a clean file, then upload it to your Theme/default folder to see if that makes a difference.

Normally, I'd ask if you tried the Package Manager to install it, but this is simply a coding tip that brandonroy supplied, it didn't come with a zip file.

Good luck with it, Joe!
My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Wariors of Fate

Thanks and it does work in smf 1.1.10.

I have edited as you say. So it should work with 1.1.9 version. You can see mine working at: hxxp:www.liveatdhaka.com [nonactive]

Though I placed the button image in the tp-image folder, but if one can input the path correctly in the post template, then it should work for all versions of SMF .

A great feature would be if user could select various host to host the image. I think you understand not only hxxp:tinypic.com [nonactive] but others like imageshack and etc.

Again thanks for a nice and great idea.


gbsothere

I've found a way to make this work with RC1.2, although I don't like where the button is landing so if someone smarter than I would show me where to make a better choice, that would be great.   :)

In RC1.2, Themes/Post.template.php I found:

{
echo '
<tr>
<td align="right"></td>
<td valign="middle">
', template_control_richedit($context['post_box_name'], 'bbc'), '
</td>
</tr>';



And added AFTER:

echo '&nbsp;&nbsp;<a onclick="window.open(\'URL FOR YOUR TINYPIC HTML FILE HERE\',\'POPUP\',\'width=280,height=540,scrollbars=0\');return false;" href="#"><img src="URL FOR THE IMAGE BUTTON HERE" border="0"></a>';



The button is landing up at the top left of the BBC field, just above "Subject": but, hey, it works.   :D


My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Tyrsson

PM at your own risk, some I answer, if they are interesting, some I ignore.

gbsothere

My apologies, but I am taking a break from accepting PM requests for support.  If I am not currently assisting you, please do not ask as long as this notice is posted.  Thank you.

I Don't Want To Grow Old Alone


It has been proven that Steely Dan reduces the occurrence of road rage, according to an independent study.



A reminder about admin / ftp passwords etc.

Tyrsson

PM at your own risk, some I answer, if they are interesting, some I ignore.

Advertisement: