Jump to content

Recommended Posts

Posted

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

 

  • 4 months later...
Posted

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...
Posted (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 by steadyoptions
  • 3 months later...
Posted
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?

Posted
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...
Posted
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...
Posted
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?

Posted

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?

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

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

Posted
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?

Posted
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?

Posted
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?

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...