twitter tweet button alignment

For support and discussion related to templates, themes, and imagesets in phpBB 3.0.
Anti-Spam Guide
Locked
Ather
Registered User
Posts: 1032
Joined: Fri May 08, 2009 9:42 am
Location: Kingdom of Bahrain
Name: Ather Akber

twitter tweet button alignment

Post by Ather »

Hi, i would like to place a twitter button on the rightside, above the pagination BUT it should be on the same line of the Topic title, and should be at the right, can some1 help me with it? :?
CPL Syed Ather Akbar
Regional Command Southwest
Camp Leatherneck, Afghanistan

My Mods/Snippets
User avatar
TheIlluminative
Former Team Member
Posts: 2451
Joined: Thu Jun 26, 2003 11:34 pm
Location: Egypt
Name: Mahmoud
Contact:

Re: twitter tweet button alignment

Post by TheIlluminative »

Link to board, please.
Ather
Registered User
Posts: 1032
Joined: Fri May 08, 2009 9:42 am
Location: Kingdom of Bahrain
Name: Ather Akber

Re: twitter tweet button alignment

Post by Ather »

its a community forum, locally hosted
CPL Syed Ather Akbar
Regional Command Southwest
Camp Leatherneck, Afghanistan

My Mods/Snippets
User avatar
TheIlluminative
Former Team Member
Posts: 2451
Joined: Thu Jun 26, 2003 11:34 pm
Location: Egypt
Name: Mahmoud
Contact:

Re: twitter tweet button alignment

Post by TheIlluminative »

Hmmm... What style do you use?
Ather
Registered User
Posts: 1032
Joined: Fri May 08, 2009 9:42 am
Location: Kingdom of Bahrain
Name: Ather Akber

Re: twitter tweet button alignment

Post by Ather »

its proFormell
CPL Syed Ather Akbar
Regional Command Southwest
Camp Leatherneck, Afghanistan

My Mods/Snippets
User avatar
TheIlluminative
Former Team Member
Posts: 2451
Joined: Thu Jun 26, 2003 11:34 pm
Location: Egypt
Name: Mahmoud
Contact:

Re: twitter tweet button alignment

Post by TheIlluminative »

Open file: styles/proFormell/template/viewtopic_body.html, find:

Code: Select all

<h2><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a></h2>
add the code of the tweet button before the </h2> with a span floating right. Would be something like that:

Code: Select all

<h2><a href="{U_VIEW_TOPIC}">{TOPIC_TITLE}</a><span style="float: right">YOUR_TWEET_BUTTON_CODE</span></h2>
refresh templates through ACP after editions.
Ather
Registered User
Posts: 1032
Joined: Fri May 08, 2009 9:42 am
Location: Kingdom of Bahrain
Name: Ather Akber

Re: twitter tweet button alignment

Post by Ather »

Thanks for the reply, i did try it with <div> too

currently:
Image

is there anyway to make it aligned to the page border i.e the button should end over the text "1 of 1"
CPL Syed Ather Akbar
Regional Command Southwest
Camp Leatherneck, Afghanistan

My Mods/Snippets
User avatar
TheIlluminative
Former Team Member
Posts: 2451
Joined: Thu Jun 26, 2003 11:34 pm
Location: Egypt
Name: Mahmoud
Contact:

Re: twitter tweet button alignment

Post by TheIlluminative »

This is because of the width of the iframe itself. Reduce its width from 110px to 92px, this should make it aligned with the pagination. But I have to tell you, if the topic got lots of tweets, the button might not show properly, it might get cut at the right side (the box that shows how many times it got tweeted might not display fully), but this only at the case of many tweets.
User avatar
steveraven
Registered User
Posts: 19
Joined: Sun Jan 09, 2011 11:06 am

Re: twitter tweet button alignment

Post by steveraven »

Absolutely - this is EXACTLY what I was looking for!

One question now though - can the tweet button be added to individual forum posts as well?
User avatar
TheIlluminative
Former Team Member
Posts: 2451
Joined: Thu Jun 26, 2003 11:34 pm
Location: Egypt
Name: Mahmoud
Contact:

Re: twitter tweet button alignment

Post by TheIlluminative »

Yes, it can. All you have to do is to modify the URL of the tweet button to replicate the post's ID in it, and add it inside the <!-- BEGIN postrow --> loop to make sure it shows for every post.
Locked

Return to “[3.0.x] Styles Support & Discussion”