Jump to content

Featured Replies

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;}}

 

  • Author

Oh yeah. I was looking into adding it myself as well but integration for people that aren't as savvy would be good.

  • 4 months later...

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

  • 2 weeks later...

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 by steadyoptions

  • 3 months later...
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?

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. 

 

  • 3 months later...
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!

  • 2 weeks later...
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?

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?

This code is not fine because results in multiple metatags for keywords:

{{\IPS\Output::i()->metaTags['keywords'] = $record->tags();}}

Result in:

58dc85579fdf0_CapturadeTela2017-03-30s1_10_28AM.thumb.png.7d160ee95811d6639de7e9b10fa131e9.png

@opentype, is there a way to use tags as meta keywords?

Thanks a lot!

???

  • 1 month later...
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?

2 hours ago, Strakks said:

Does your Supergrid view forumposts the same as grid?

Sorry, I don’t understand the question. 

4 hours ago, opentype said:

Sorry, I don’t understand the question. 

Is forum posts viewed like grid? instead of plain text

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.  

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?

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?

  • Author

@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.

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?

  • Author

The grid style only applies to forum lists. The mod above will do it for databases in pages. Neither of which will touch topics.

aha okay! to bad :(

thankstho

Recently Browsing 0

  • No registered users viewing this page.