Advertisement:

Author Topic: Share This Topic  (Read 341412 times)

Offline KensonPlays

  • SMF Hero
  • ******
  • Posts: 4,306
    • @Kenson_Plays on Twitter
Re: Share This Topic
« Reply #20 on: September 08, 2009, 04:23:25 PM »
oh i hated the efsane theme support topic being locked! too hard now, might havta change theme!

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,401
    • StoryBB/StoryBB on GitHub
Re: Share This Topic
« Reply #21 on: September 08, 2009, 04:25:30 PM »
It was obviously removed for a reason.

If you're still having trouble adding the mod, attach your Display.template.php file and I can look at it for you.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline KensonPlays

  • SMF Hero
  • ******
  • Posts: 4,306
    • @Kenson_Plays on Twitter
Re: Share This Topic
« Reply #22 on: September 08, 2009, 04:29:06 PM »
here it is

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,401
    • StoryBB/StoryBB on GitHub
Re: Share This Topic
« Reply #23 on: September 08, 2009, 04:53:38 PM »
Here's the edited version.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline KensonPlays

  • SMF Hero
  • ******
  • Posts: 4,306
    • @Kenson_Plays on Twitter
Re: Share This Topic
« Reply #24 on: September 08, 2009, 04:58:23 PM »
I GET:

Template Parse Error!
It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.

You can also try refreshing this page.

Offline KensonPlays

  • SMF Hero
  • ******
  • Posts: 4,306
    • @Kenson_Plays on Twitter
Re: Share This Topic
« Reply #25 on: September 08, 2009, 04:59:44 PM »
what exactly was your change?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,401
    • StoryBB/StoryBB on GitHub
Re: Share This Topic
« Reply #26 on: September 08, 2009, 05:18:09 PM »
Not entirely sure what happened but the file got corrupted by the looks of things.

Attached is a known good version.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline KensonPlays

  • SMF Hero
  • ******
  • Posts: 4,306
    • @Kenson_Plays on Twitter
Re: Share This Topic
« Reply #27 on: September 08, 2009, 05:30:24 PM »
thanks it works thanks!

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,401
    • StoryBB/StoryBB on GitHub
Re: Share This Topic
« Reply #28 on: September 09, 2009, 09:12:53 PM »
I've added Twitter and StumbleUpon now to this in v1.1.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Share This Topic
« Reply #29 on: September 09, 2009, 09:21:53 PM »
Thanks for the quick update. i want to install this mod now ... but i don't see this 'exact' bit of code in my themes display.template

Code: [Select]
<td valign="middle" width="2%" style="padding-left: 6px;">
<img src="', $settings['images_url'], '/topic/', $context['class'], '.gif" align="bottom" alt="" />
</td>
<td width="13%"> ', $txt[29], '</td>

It's in the default display.template so I'm guessing it's not related to another mod i have ... i attached my display.template for you to take a look
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,401
    • StoryBB/StoryBB on GitHub
Re: Share This Topic
« Reply #30 on: September 09, 2009, 09:43:33 PM »
No, it's a customised theme so it won't be in there.

Edited version attached - you'll have to rename it back to Display.template.php though.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Share This Topic
« Reply #31 on: September 09, 2009, 09:44:39 PM »
could you maybe just paste here the code to find and replace ?
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,401
    • StoryBB/StoryBB on GitHub
Re: Share This Topic
« Reply #32 on: September 09, 2009, 09:48:02 PM »
*shrug* I gave you the attachment with it ready done in. Line spacing is messed up due to a known bug in the attachments system.


Code: (find) [Select]
// Show the topic information - icon, subject, etc.

Code: (add BEFORE THIS) [Select]
// Build list of social icons
$social_icons = '';
$sites = array(
'facebook' => 'http://www.facebook.com/share.php?u=%s',
'delicious' => 'http://del.icio.us/post?url=%s',
'digg' => 'http://digg.com/submit?phase=2&url=%s',
'reddit' => 'http://reddit.com/submit?url=%s',
'stumbleupon' => 'http://www.stumbleupon.com/submit?url=%s',
'twitter' => 'http://twitter.com/home?status=%s',
);
if(!empty($modSettings['queryless_urls']) && $modSettings['queryless_urls'])
$page_url = $scripturl . '/topic,' . $context['current_topic'] . '.0.html';
else
$page_url = $scripturl . '?topic=' . $context['current_topic'] . '.0';

foreach($sites as $site => $url) {
$entry = 'share_' . $site;
if(!empty($modSettings[$entry]) && $modSettings[$entry]) {
$social_icons .= sprintf('<a href="' . $url . '" target="_blank"><img src="' . $settings['images_url'] . '/share/' . $site . '.gif" align="bottom" title="' . $txt['share_default_tooltip'] . '" alt="' . $txt['share_default_tooltip'] . '" /></a>', urlencode($page_url), $txt[$entry], $txt[$entry]);
}
}

if($social_icons == "")
$social_icons = '<img src="' . $settings['images_url'] . '/topic/' . $context['class'] . '.gif" align="bottom" alt="" />';

Code: (find) [Select]
<td valign="middle" align="left" width="16%" style="padding-left: 6px;" height="25">

<img src="', $settings['images_url'], '/topic/', $context['class'], '.gif" alt="" align="middle" />';

 

echo '

', $txt[29], '

</td>

Code: (replace) [Select]
<td valign="middle" align="left" width="16%" style="padding-left: 6px;" height="25">

', $social_icons, '

</td>
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Share This Topic
« Reply #33 on: September 09, 2009, 09:57:47 PM »
 :P yeah, i sorry for being a drag .. but i kinda like to see and learn all the changes .... working now ...

few things .. is it possible to put a space between the icons .. they are almost touching... and the participation icons no longer shows when the social icons are on .. but that's minor i guess
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline plusev

  • Jr. Member
  • **
  • Posts: 294
Re: Share This Topic
« Reply #34 on: September 09, 2009, 11:52:20 PM »
There is a typo in stumble gif. It says stumbleuponl.gif instead of stumbleupon.gif. It breaks the image.

+EV

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Share This Topic
« Reply #35 on: September 10, 2009, 02:53:59 AM »
There is a typo in stumble gif. It says stumbleuponl.gif instead of stumbleupon.gif. It breaks the image.

+EV

Good Find ...

@ Arantor with sharing to twitter it inserts the url .. would it be possible to also enter the subject title then the url ?
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Share This Topic
« Reply #36 on: September 10, 2009, 03:15:33 AM »
hmmm, scrap that idea .. as most often it would be hitting the 140max character limit on twitter, you'd have to somehow enter the topic name and shorten the url using a site like bit.ly  :-\ too much work
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,401
    • StoryBB/StoryBB on GitHub
Re: Share This Topic
« Reply #37 on: September 10, 2009, 03:21:54 AM »
:P yeah, i sorry for being a drag .. but i kinda like to see and learn all the changes .... working now ...

few things .. is it possible to put a space between the icons .. they are almost touching... and the participation icons no longer shows when the social icons are on .. but that's minor i guess

You could use a compare tool such as WinMerge to do the comparison, so you will be able to see what has changed - that's what I do when I'm not sure.

As for the icons, the reason they had to be removed is because the layout in 1.1 is dependent on a table and in the majority of cases adding 2+ icons pushed the table out of alignment so that the profile area got extended to be wider than it should have been. You could of course re-add the code in by looking at what was taken out and readding it - but it may break the layout of the table.

There is a typo in stumble gif. It says stumbleuponl.gif instead of stumbleupon.gif. It breaks the image.

+EV

Thanks, fixed that :)

@ Arantor with sharing to twitter it inserts the url .. would it be possible to also enter the subject title then the url ?

It could be done but you have the huge risk of cutting the link in half. I'll see about it for 1.2 - which won't happen today.


Edited to add:
hmmm, scrap that idea .. as most often it would be hitting the 140max character limit on twitter, you'd have to somehow enter the topic name and shorten the url using a site like bit.ly  :-\ too much work

Yes - that's just the concern I had above. Though you could do some sanity checks to add it if it's under 140 characters.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline aw06

  • SMF Hero
  • ******
  • Posts: 2,763
  • Gender: Male
  • Make The Link
    • shopinja.classifieds on Facebook
    • @shopinja on Twitter
    • ShopinJA.com
Re: Share This Topic
« Reply #38 on: September 10, 2009, 03:29:00 AM »
ok .. work your magic ... will see what version 1.2 Brings :P...

This is the best twitter share app i have seen and used ...
http://tbuzz.arc90.com/

You can give it a look, basically you highlight some text, then click the share button and it uses that as the status + it automatically shortens the url using bit.ly

thinking maybe you can get some ideas from it
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,401
    • StoryBB/StoryBB on GitHub
Re: Share This Topic
« Reply #39 on: September 10, 2009, 03:55:48 AM »
It means writing a LOT more code into SMF - the current code just works without anything special. To add what you're suggesting would actually mean adding new actions to SMF itself, e.g. index.php?action=share... because way more extra processing is required to catch all that.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.