Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Aiheen aloitti: WittyUsername - huhtikuu 19, 2012, 05:28:09 IP

Otsikko: Re: Linked Image in Posted Messages? -- Or "New Quick Button"
Kirjoitti: WittyUsername - huhtikuu 19, 2012, 05:28:09 IP
Or something. That's probably a horrid way to describe what i want.

Anyhow, at my board, soupsquad.com, I had a guy develop a sorta dump that stores and generates BBCode. I sorta want this to be used a bit more, but I also want it to be convenient. I got it up in a link on the navbar, and also using this (http://custom.simplemachines.org/mods/index.php?mod=1856), I got it on the posting editor (not the quick reply though) but that's not completely what I want.

What I want is a small little graphic icon, with the word "Dump" beside it, that is in any of the areas circled in the following graphic, that would lead to a new tab/window. That way it's just sorta quick.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fsoupsquad.com%2Fdump%2Ffiles%2F97070.png&hash=0b20603b3111ce93407d3e032e438013a0014ceb)

Problem is... I dunno how to word that, keep in mind I did look, but came back to the first mod every-time. I don't mind going into the source, but I'm hardly a coder and just do a lot of guess work and really fear screwing something up big time.

SMF 2.02
Otsikko: Re: Linked Image in Posted Messages? -- Or "New Quick Button"
Kirjoitti: WittyUsername - huhtikuu 21, 2012, 04:47:18 IP
Hate to bump this, I'm guessing nobody knows how to help me out here, but hey. Why not go for a shot in the dark?

I guess I could say, adding a new quick button item to posts? I edited the title to say that.

Anyhow, I'm still looking and wanting to do this. It's been two days since I posted this. But, that also probably means "No one knows, dude. Sorry."
Otsikko: Re: Re: Linked Image in Posted Messages? -- Or "New Quick Button"
Kirjoitti: kat - huhtikuu 21, 2012, 05:13:02 IP
Just a "What if", here, Soupy.

Would it be useful to have it in the nav bar, where "Home", "Help", etc. are?

I'm no coder, by a LOOOOOOOOOOOOONG way!

But, there's a remote possibility that I might be able to work it out, if I have a URL for the new window/tab.

If my theory's correct, it'll just means adding something to Subs.php and index.english.php

No promises, but I could have a go.

Might need to wait until Monday, though.

'course, if anyone else wants to go for it, in the meantime, so much the better. ;)
Otsikko: Re: Re: Linked Image in Posted Messages? -- Or "New Quick Button"
Kirjoitti: WittyUsername - huhtikuu 21, 2012, 06:54:56 IP
Lainaus käyttäjältä: K@ - huhtikuu 21, 2012, 05:13:02 IP
Just a "What if", here, Soupy.

Would it be useful to have it in the nav bar, where "Home", "Help", etc. are?

I'm no coder, by a LOOOOOOOOOOOOONG way!
Well, we currently got that, using one of those menu bar mods. It was more of me wanting it to be more convenient. You know, you're reading a thread, you see something to respond to, want to add a an image, it would be nice to just hit a nearby button on a post, a new window (or pop up) comes up and it's the dump spot -- you do your thing there, copy the BBCode and close it, you're still at the same spot, hit reply and post.

It's not the most needed thing, but it's something I would just really like to add. You know?
Otsikko: Re: Linked Image in Posted Messages? -- Or "New Quick Button"
Kirjoitti: kat - huhtikuu 22, 2012, 06:46:46 AP
Yeah, I'm with you.

In the theme's Display.template.php file, you'll see this:

// Can they reply? Have they turned on quick reply?
if ($context['can_quote'] && !empty($options['display_quick_reply']))
echo '
<li class="quote_button"><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '" onclick="return oQuickReply.quote(', $message['id'], ');">', $txt['quote'], '</a></li>';

// So... quick reply is off, but they *can* reply?
elseif ($context['can_quote'])
echo '
<li class="quote_button"><a href="', $scripturl, '?action=post;quote=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], ';last_msg=', $context['topic_last_message'], '">', $txt['quote'], '</a></li>';

// Can the user modify the contents of this post?
if ($message['can_modify'])
echo '
<li class="modify_button"><a href="', $scripturl, '?action=post;msg=', $message['id'], ';topic=', $context['current_topic'], '.', $context['start'], '">', $txt['modify'], '</a></li>';

// How about... even... remove it entirely?!
if ($message['can_remove'])
echo '


Sticking the code you need, there, should put it where the "Quote", "Modify", etc. thingies are.

Dunno what the code would need to be, though. :(
Otsikko: Re: Re: Linked Image in Posted Messages? -- Or "New Quick Button"
Kirjoitti: WittyUsername - huhtikuu 23, 2012, 07:19:49 AP
To be honest, K@, I actually tried this before, and it didn't make any difference, perhaps I'm not well acquainted enough to figure it out.

Weirdly, when I went to go look at it, it seemed to reverted. Tried it again, still nothing. Hmm... I mean, I even added to the CSS and images.

Though, my theme seems to feed off the default theme. Oh well. Can't figure it out, can't figure it out. What are you gonna do, you know?
Otsikko: Re: Re: Linked Image in Posted Messages? -- Or "New Quick Button"
Kirjoitti: kat - huhtikuu 23, 2012, 08:05:40 AP
If, at first, you don't succeed.

Go have a beer. ;)

I'm wondering if it'd be worth rummaging through the mods, to see if there's something that could, perhaps, be butchered-about, for this.