Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
coding-topic
Problem with tweets in posts??
Avatar
Frank Mastroianni
Member
Free Members
sp_UserOfflineSmall Offline
Jan 9, 2015 - 5:53 pm

Can you please help me correct the issue seen here:

http://forum.canadiangolfmagaz.....ns-extreme

When embedding tweets in the unified SP theme, the tweet portion at the bottom gets cut off.

Thank you

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Jan 9, 2015 - 6:37 pm

The problem seems to be coming from the iFrames inherited CSS.

#spMainContainer .spPostContent iframe {
    max-width: 100%;
    width: 640px;
    height: 360px;

The height:360px is whats cutting things off. The theme itself doesn't set a height for the iFrame, only the 'max-width' which you see at the top there, so this is coming from somewhere else.

How did you embed the tweet, was it the normal iFrame embed code? if so it normally allows you to set a height such as

<iframe width="xxx" height="xxx" src=

Avatar
Frank Mastroianni
Member
Free Members
sp_UserOfflineSmall Offline
Jan 9, 2015 - 6:43 pm

No, I didn't actually embed the code in an iframe. Generally, from what I've done in the past outside of simple press in most Wordpress themes, all you need to do is copy and paste the link to a Tweet and it should embed properly.

This is also what most users would be doing and the way I'd want it to function for them. Is there any way to fix this so that users can simply post the url for the Tweet as it generally works in Wordpress and most other platforms?

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
sp_UserOfflineSmall Offline
Jan 9, 2015 - 7:56 pm

not sure since wp doesnt do anything with tweet urls... we make no conversion whatsoever...  Except we the wp content filters still run to do whatever would normally happen with post content...

its wp that is generating the iframe and something on the site (theme or plugin) is adding the inline page css style for the iframe...  we do not add an iframe height like that as Ike says...

what on your site is doing that?  not sure... since its in page styled, seems like some js...

but we cannot give you any css to help since those added styles will take control...

guess I would try a temp switch to the default wp theme and see if still going on...  if so, try disabling other plugins and see if any better...  cant tell much but you have some jarida plugin that is potentially affecting images/iframes...

Avatar
Frank Mastroianni
Member
Free Members
sp_UserOfflineSmall Offline
Jan 9, 2015 - 8:36 pm

Where do I look to find the values listed in Ike's post above and what would happen if I changed the height value?

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Jan 10, 2015 - 4:27 am

Somewhere you have CSS rules being added to your page loads - i.e., inline embedded into the page. One of the rules being added this way is the one effecting the iFrame size - 

#spMainContainer .spPostContent iframe

because it is being loaded inline like this it will override just about everything. What I can't tell you, of course, is what is loading it but I can tell you it isn't Simple:Press. However - it does target several Simple:Press elements and rules so whoever wrote it knew something of what they were doing,

Has this been added by someone to the spFunctions.php file of your SP theme? Or the functions.php file of your WordPress theme perhaps?

andy-signature.png
YELLOW
SWORDFISH
Avatar
Frank Mastroianni
Member
Free Members
sp_UserOfflineSmall Offline
Jan 10, 2015 - 12:41 pm

Swordfish,

I actually found where the values were being inherited from and removed the height value and all works well now.

Thank you

Avatar
Ike
Sawtry, UK
Member
Free Members
sp_UserOfflineSmall Offline
Jan 10, 2015 - 3:24 pm

Glad you got it fixed, would be interested to know where the problem was in the end?

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626