News:

Wondering if this will always be free?  See why free is better.

Main Menu

Share This Topic

Started by Suki, September 06, 2009, 05:09:23 AM

Previous topic - Next topic

KensonPlays

oh i hated the efsane theme support topic being locked! too hard now, might havta change theme!

Arantor

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.

KensonPlays


Arantor

Here's the edited version.

KensonPlays

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.

KensonPlays

what exactly was your change?

Arantor

Not entirely sure what happened but the file got corrupted by the looks of things.

Attached is a known good version.

KensonPlays


Arantor

I've added Twitter and StumbleUpon now to this in v1.1.

aw06

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

<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

Arantor

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.

aw06

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

Arantor

*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>

aw06

 :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

plusev

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

+EV

aw06

Quote from: plusev 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

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

aw06

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

Arantor

Quote from: aw06 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

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.

Quote from: plusev 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

Thanks, fixed that :)

Quote from: aw06 on September 10, 2009, 02:53:59 AM
@ 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:
Quote from: aw06 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

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.

aw06

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

Arantor

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.

Advertisement: