Morrigan Posted April 28, 2016 Share Posted April 28, 2016 So this is something newish and I know that there is the twitter integration so this could be an awesome addition. This may not work "with" the integration but it would be a good SEO thing to allow for people to set it up. https://dev.twitter.com/cards/overview Just a thought. chilihead, The Old Man, ArchLinux and 2 others 5 Link to comment Share on other sites More sharing options...
opentype Posted April 28, 2016 Share Posted April 28, 2016 I recommended it too a while ago. Makes perfect sense to support these Twitter meta tags along with the ones Facebook looks for. Tweets with images are so much more likely to get clicks than just plain links. If you can’t wait: it’s surprisingly simple to add it to certain templates. For example, I added this to my video database in Pages: {{\IPS\Output::i()->metaTags['twitter:card'] = 'summary_large_image';}} {{\IPS\Output::i()->metaTags['twitter:site'] = '@TypographyGuru';}} {{\IPS\Output::i()->metaTags['twitter:title'] = $record->_title;}} {{\IPS\Output::i()->metaTags['twitter:description'] = 'Watch this video in the collection of the best typography videos on Typography.Guru';}} {{\IPS\Output::i()->metaTags['twitter:image'] = (string) \IPS\File::get( 'cms_Records', $record->record_image )->url;}} Morrigan, Joey_M, Meddysong and 6 others 8 1 Link to comment Share on other sites More sharing options...
Morrigan Posted April 28, 2016 Author Share Posted April 28, 2016 Oh yeah. I was looking into adding it myself as well but integration for people that aren't as savvy would be good. The Old Man, Joey_M and chilihead 3 Link to comment Share on other sites More sharing options...
BenCurry Posted August 31, 2016 Share Posted August 31, 2016 Hi, I have been searching this site for something similar and this post came up. Does anyone know if this went anywhere? Currently when a link to the sate gets tweeted the image shared is the one of my site logo. I would like this to first check the thread/blog/article that is being shared and if no image if found then use the site logo. Is this possible? Thanks ايمن 1 Link to comment Share on other sites More sharing options...
steadyoptions Posted September 8, 2016 Share Posted September 8, 2016 (edited) It is my understanding that IPS currently doesn't support it. Question: if I want to implement it on article pages, which template should I put it to? Also, why the code above different from the sample code supplied by Twitter here? Edited September 8, 2016 by steadyoptions Link to comment Share on other sites More sharing options...
Strakks Posted December 15, 2016 Share Posted December 15, 2016 On 2016-09-08 at 9:52 PM, steadyoptions said: It is my understanding that IPS currently doesn't support it. Question: if I want to implement it on article pages, which template should I put it to? Also, why the code above different from the sample code supplied by Twitter here? ¨Same! Where to implent it? Link to comment Share on other sites More sharing options...
opentype Posted December 15, 2016 Share Posted December 15, 2016 On 9/8/2016 at 9:52 PM, steadyoptions said: Question: if I want to implement it on article pages, which template should I put it to? In the Pages template your database uses for the “record view”. On 9/8/2016 at 9:52 PM, steadyoptions said: Also, why the code above different from the sample code supplied by Twitter here? It isn’t. It’s an application of the Twitter code. You can’t just paste the Twitter code. It’s just an example. The fields need to be populated with the dynamic content from the database record. Also, don’t just copy my code above. That’s also just an example. My Pages template include Twitter card support. You don’t need to do anything else than add your Twitter handle to the template. sobrenome 1 Link to comment Share on other sites More sharing options...
sobrenome Posted March 19, 2017 Share Posted March 19, 2017 On 28/04/2016 at 3:44 PM, opentype said: I recommended it too a while ago. Makes perfect sense to support these Twitter meta tags along with the ones Facebook looks for. Tweets with images are so much more likely to get clicks than just plain links. If you can’t wait: it’s surprisingly simple to add it to certain templates. For example, I added this to my video database in Pages: {{\IPS\Output::i()->metaTags['twitter:card'] = 'summary_large_image';}} {{\IPS\Output::i()->metaTags['twitter:site'] = '@TypographyGuru';}} {{\IPS\Output::i()->metaTags['twitter:title'] = $record->_title;}} {{\IPS\Output::i()->metaTags['twitter:description'] = 'Watch this video in the collection of the best typography videos on Typography.Guru';}} {{\IPS\Output::i()->metaTags['twitter:image'] = (string) \IPS\File::get( 'cms_Records', $record->record_image )->url;}} Perfect! Link to comment Share on other sites More sharing options...
sobrenome Posted March 30, 2017 Share Posted March 30, 2017 On 28/04/2016 at 3:44 PM, opentype said: {{\IPS\Output::i()->metaTags['twitter:image'] = (string) \IPS\File::get( 'cms_Records', $record->record_image )->url;}} Is there a way to mix text and strings? I want to output record's description mixing a common description text and with strings: record title and database category name. And is there an easy way to use tags as keywords? Link to comment Share on other sites More sharing options...
sobrenome Posted March 30, 2017 Share Posted March 30, 2017 It's working for me: {{\IPS\Output::i()->metaTags['description'] = 'Text ' . $record->_title . ', text ' . $record->container()->_title . ', text ' . $record->author()->name . '.';}} What about the tags as keywords? Link to comment Share on other sites More sharing options...
sobrenome Posted March 30, 2017 Share Posted March 30, 2017 This code is not fine because results in multiple metatags for keywords: {{\IPS\Output::i()->metaTags['keywords'] = $record->tags();}} Result in: Link to comment Share on other sites More sharing options...
sobrenome Posted March 31, 2017 Share Posted March 31, 2017 @opentype, is there a way to use tags as meta keywords? Link to comment Share on other sites More sharing options...
opentype Posted March 31, 2017 Share Posted March 31, 2017 {{\IPS\Output::i()->metaTags['keywords'] = implode(',',$record->tags());}} Joel R, Meddysong and sobrenome 2 1 Link to comment Share on other sites More sharing options...
sobrenome Posted March 31, 2017 Share Posted March 31, 2017 Thanks a lot! ??? Link to comment Share on other sites More sharing options...
Strakks Posted May 15, 2017 Share Posted May 15, 2017 On 2016-12-15 at 7:56 PM, opentype said: In the Pages template your database uses for the “record view”. It isn’t. It’s an application of the Twitter code. You can’t just paste the Twitter code. It’s just an example. The fields need to be populated with the dynamic content from the database record. Also, don’t just copy my code above. That’s also just an example. My Pages template include Twitter card support. You don’t need to do anything else than add your Twitter handle to the template. Does your Supergrid view forumposts the same as grid? Link to comment Share on other sites More sharing options...
opentype Posted May 15, 2017 Share Posted May 15, 2017 2 hours ago, Strakks said: Does your Supergrid view forumposts the same as grid? Sorry, I don’t understand the question. Link to comment Share on other sites More sharing options...
Strakks Posted May 15, 2017 Share Posted May 15, 2017 4 hours ago, opentype said: Sorry, I don’t understand the question. Is forum posts viewed like grid? instead of plain text Link to comment Share on other sites More sharing options...
Joel R Posted May 15, 2017 Share Posted May 15, 2017 2 hours ago, Strakks said: Is forum posts viewed like grid? instead of plain text To clarify, the Supergrid template by @opentype only applies to records / articles created in IP.Pages. It does not change the layout of IP.Board posts or topics. Link to comment Share on other sites More sharing options...
Strakks Posted May 16, 2017 Share Posted May 16, 2017 7 hours ago, Joel R said: To clarify, the Supergrid template by @opentype only applies to records / articles created in IP.Pages. It does not change the layout of IP.Board posts or topics. Okay thanks. That's what I needed to know. Is there anything that works the same as grid but applies to forums? Link to comment Share on other sites More sharing options...
Simon Woods Posted May 16, 2017 Share Posted May 16, 2017 9 hours ago, Strakks said: Is there anything that works the same as grid but applies to forums? For forum listings, yes. For post listings, no. Which one are you looking for? Link to comment Share on other sites More sharing options...
Strakks Posted May 16, 2017 Share Posted May 16, 2017 4 hours ago, Simon Woods said: For forum listings, yes. For post listings, no. Which one are you looking for? This https://gyazo.com/7a08befb0e4da9bb418d718828eb04a6 The topic title. Is that possible? Link to comment Share on other sites More sharing options...
Morrigan Posted May 16, 2017 Author Share Posted May 16, 2017 @Strakks you should ask in the Peer assistance forum for help to design this yourself or else hire someone to make that for you. Either via a mod or theme design. Link to comment Share on other sites More sharing options...
Strakks Posted May 16, 2017 Share Posted May 16, 2017 Just now, Morrigan said: @Strakks you should ask in the Peer assistance forum for help to design this yourself or else hire someone to make that for you. Either via a mod or theme design. So the grid wont apply to topic title? Link to comment Share on other sites More sharing options...
Morrigan Posted May 16, 2017 Author Share Posted May 16, 2017 The grid style only applies to forum lists. The mod above will do it for databases in pages. Neither of which will touch topics. Link to comment Share on other sites More sharing options...
Strakks Posted May 16, 2017 Share Posted May 16, 2017 aha okay! to bad thankstho Link to comment Share on other sites More sharing options...
Recommended Posts