Giter Club home page Giter Club logo

content-cards's People

Contributors

emanuelst avatar ideag avatar khromov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

content-cards's Issues

Proposed roadmap

done

  • #19 rename GitHub repo to ideag/content-cards
  • #23 Fallback to <title> and <meta> if OG data not found
  • #9 A list of popular sites not currently having native oEmbed support in WP.
  • #15 add validation to template functions
  • #24 fill and update readme.txt
  • #6 Store OG data in postmeta, update via WP_Cron
  • #10 Create multiple skins: for Twenty* themes and some generic ones.
  • #17 Add uninstall hook for cleanup
  • #11 Skin detection system, similar to Themes (based on a comment block in stylesheet)
  • #5 TinyMCE button that prints a shortcode to to embed ANY url, not only whitelisted ones. (Right now, you'd have to add a regexp for each blog.) This is probably my most common use case, ie. wanting to link to a random blog that I'll probably never going to link to again.
  • #8 Allow PHP in templates. More WordPress like and more flexible.
  • #7 Simplified regexp rules. User would only need to enter a domain (ie. google.com) and the rest of the regexp rules get added internally.
  • Checkbox to disable the default styles, or look for opengraph-oembed.css in currently active theme and if it exists, load that instead of the default. Stylesheet now obbeys to the same logic as template files, can be overwritten in theme
  • Multiple templates and css skins, for example we could make nice looking themes for the official WP themes, and some basic one, like "Light background" and "black background". just pushed basic support for skins. Anybody care to do some actual design? ;)

Feel free to add more suggestions or discuss the existing ones.

Are Content Cards Tagable? (ifSoHow?)

Hello! I was wondering if it's possible to categorize a content card by tags so a user could pull up all cards under whatever category tag they may be interested in?

Thank you!

Damon K.

Validation and template functions

Right now we're using esc_url() for some variables in the template functions, I propose instead that we create dedicated functions that are escaped properly ahead of time:

the_cc_url();
the_cc_title();
the_cc_description();
the_cc_site_name();
the_cc_domain(); //New suggestion! Example: domain.com, like Facebook does it

These would also need to have versions starting with get_ as well.

It would imho simplify templating quite a bit.

Ability to set max width of Content Card

I tried this across some themes and some of them have very large columns, which means the content gets stretched to 1000px or more.

If we have an option for the max width of the content card and then center it, we would be able to let the user decide.

TinyMCE button

TinyMCE button that prints a shortcode to to embed an url

Button - done
To Do: localize dialog strings

Optimize rendering on AMP pages

Great work on the plugin! There is one thing that bothers me a bit though. I've recently installed the AMP plugin and since the AMP standard features a very limited subset of HTML/CSS, cards look suboptimal on my AMP pages.

Normal rendering
screenshot

With AMP-restrictions turned on
screenshot

I am raising this issue, looking for an advice, and potentially hoping to help you guys solve this issue. I think that eventually, card layout should simply fall back to a Blockquote style, similar to how Embedly cards get displayed, when JavaScript gets turned off

Fallback to <title> and <meta> description

A proposal from #18

If the site does not have OG, maybe we should fall back to use the <title> tag and the name="description"> tag for description text if it exists? Would make this work fairly ok on most sites even if they don't implement OG.

Use first og:image declaration if multiple are returned

Reference:
https://wordpress.org/support/topic/content-card-not-displaying-correct-image-on-own-site?replies=1

Example:

...
<meta property="og:image" content="http://margeburkell.com/wp-content/uploads/2015/09/How-to-Get-Started-on-Low-Carb-Checklist.jpg" />
<meta property="og:image" content="http://margeburkell.com/wp-content/uploads/2015/09/90_Days_cropped.png" />
<meta property="og:image" content="http://margeburkell.com/wp-content/uploads/2015/09/2012-to-2014-valentine-party-300x300.jpg" />
<meta property="og:image" content="http://margeburkell.com/wp-content/uploads/2015/08/Marge-Burkell-Trimmed.png" />
...

PHP support in templates

Allow PHP in templates, making them more in WordPress style and flexible.
Instead of file_get_contents(), use includes and output buffering.
Instead of %%title%% use <?php the_og_value('title'); ?> to insert OpenGraph data.

Controlling og:description length

Saw some site with huge OG descriptions.
Would be great if we could have something like:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed enim augue, ullamcorper sed ornare vitae, porta vitae odio. Quisque porttitor ut ipsum id ornare. Praesent urna ipsum... (250 more words)

The setting could be controllable through the options page?

Ideas for future features

  • multiple people have requested a skin where image is smaller and on the side of the text, not at the top.
  • allow people to choose the image if site provides several options WordPress.org
  • "Flush cache" button to flush all cached card data.
  • Cache favicon (Maybe? For consistency?)
  • #56 grid layout for cards WordPress.org - we decided to allow custom CSS classes via shortcode/filters, but not to implement grid layout ourselves.
  • #56 Filterable CSS classes
  • #55 Toggle for local image cache. I can imagine some sites don't want to cache OG images locally so being able to toggle it would be nice
  • Multisite support (in terms of access control. has to be discussed which was is the best to do this)

Coming from feedback on Facebook, WP.org, etc. Will be split to separate issues when/if we decide to pursue them.

Rename repository

Before this moves much forward, I'd like to rename the repo to ideag/content-cards to mirror the name on the WP.org repo.

New LinkedIn URLs not displaying as content cards

I have successfully added content cared from many different sources to my site http://www.galiadigital.co.uk. However, the last couple of LinkedIn posts I have tried to add have simply displayed as a link with the text as just http://www.linkedin.com and the link itself going to the correct URL. Old cards are not affected.
I have tried making a new card with an older URL from May and the card works. Anything prior works. Anything from July onwards does not, which makes me think this is LinkedIn change.

https://wordpress.org/support/topic/new-linkedin-urls-not-displaying-as-content-cards/

Critical issue with image caching

After updating to 0.9.1 and trying to add a content card, it went into an infinite loop and started downloading images infinitely. It created 1000 images before I managed to manually stop the web server.

Aside from that, these images were not properly hidden from the media library.

Here's an example:
screen shot 2015-09-08 at 10 24 21

I suggest retracting the 0.9.1 upgrade for now. @ideag

HTTPS URLs don't work

Hi,

first of all, thank you for your plugin :)
I'm trying to use it on my personal blog but seems it doesn't work for any HTTPS urls.
HTTP version of the same URL is ok. No errors on error log.

I use PHP 7 over nginx with PHP-fpm.

Any idea about the problem?

Add max number of links processed per batch and add a weekly schedule

We're going to be rolling this out on a WP network where thousands of content cards will be inserted, processing all of them every day would take a really long time. So I suggest we set a max number of links to be checked every time the cron job runs, something like 30 (can be user configurable).

A "Weekly" schedule would also be nice.

Finally, if the OG is working fine, but on the next check-up, the site is down, we still keep the old data, right @ideag ?

v0.9.6

It is way, way past time to release a new version. There are a couple of bugs that need to be fixed and some feature requests to be considered. I'll use this ticket to keep track of all the things that need to be done for the next release.

  • #83 Caching setting (PR #88)
  • #82 Optimize for AMP (PR #90)
  • #86 Conflict with other plugin due to OpenGraph class (PR #91)
  • #85 Custom themes for specific shortcodes (PR #95)
  • #84 Linkedin links
  • #89 Check compatibility with Twenty Seventeen

Create multiple skins

So, the skins are now PHP-enabled. You can use get_cc_data($key) and the_cc_data($key) to get OpenGraph data and the_cc_target() to insert target="_blank" if it was turned on via settings / shortcode arguments.

Also, the skins are now autodetected via a header in the CSS file (not unlike plugins/themes in WordPress). The only required and used value at the moment is Skin Name.

v1.0.0

  • Generic Light
  • Generic Dark

Future releases

  • Twenty Sixteen
  • Twenty Fifteen
  • Twenty Fourteen
  • Twenty Thirteen
  • Twenty Twelve
  • Twenty Eleven
  • Twenty Ten

Doesn't work with "umlaute" (in german)

Hi,

obviously your plugin can't handle german sites with umlaute in the headlines. It stopps to read the headlines exactly at the umlaut.

That should be easy to fix, shouldn't it?

THANK YOU!

OpenGraph data storage

Better OpenGraph data storage.

To Do:

  • store OG data in postmeta
  • update OG data via WP_Cron
  • add an option to Plugin Settings UI for update interval.
  • cleanup postmeta fields if link gets removed from post
  • ? add a cool down interval before retrying to get initial OG data if first attempt was unsuccessful

Ideas:

Optional expiration time for the opengraph oembeds and refresh them in the background. (Maybe possible to piggyback on core WP functions.) via @khromov

save the og data as a custom field into postmeta. That way it minimizes delays due to link rot and page load times waiting for embeds. via @lincourtl

Clean up cached images on plugin deactivation / uninstall

Right now cached images show up in the media library after the CC plugin has been disabled / uninstalled.

I think we should delete the images even on deactivation of the plugin, since the user expectation is not to have a "dirty" media library if they deactivate this plugin.

@ideag Thoughts?

Loading icon for dark theme

Right now, the light theme loading gif is always used. We need to make a separate dark gif that matches the dark color schemes, add in the proper filters etc.

Uninstall hook

Add an uninstall hook to cleanup postmeta if plugin is deleted.

WP Site Images displaying too large next to site names

Wow, this plugin has come so far in so short a time! Thanks for all your work on Content Cards. I can't believe nobody hasn't done this before now.

Just a note that it seems the new WordPress site images are being shown at too large a size next to content_cards_site_name.

You can see an example here: http://leolincourt.com/cc-card-demo/

The regular news sites, and the one WP site which isn't using the new site images, display at icon size. Meanwhile the two WP sites using the new site images are being displayed too large.

<div class="content_cards_site_name">
  <img scale="0" src="//subpanda.com/wp-content/uploads/2015/03/62881.png.jpg" alt="Subsequent Panda Creation" class="content_cards_favicon">
  Subsequent Panda Creation
</div>

Grab data parsed and generate custom post with metadata?

Hi all,
What if the parser already being used could populate a wp_post and its metadata? The way it would work would be the same as now: a button in tinymce where user can put an url. But after url is passed, the content, description and metadata could be populated with the data grabbed. So we would not have a simple card, but a full post.

fill and update `readme.txt`

Update readme.txt:

  • Add @khromov as contributor
  • Add links to other plugins
  • Add link to githb repo for issues
  • Update description
  • Create initial documentation
  • Add some screenshots to assets

Better image handling

From AWP post:

Looks great guys, just put it to the test. One little request would be to limit the image size pulled from the OpenGraph data (or perhaps even give a choice). I just did a test and the site I pulled in had a HUGE image set as OpenGraph.

We really have to introduce some consistency here. Maybe even return to the idea of caching images in the Media Library.

Why does one url work but another one doesn't?

I used the following shortcodes with Content Cards. The first one embeds with no problem but the second is invalid. Can you decipher the reason why one would work but not the other? It's an https website: https//:ncmountains.net

[contentcards url="http://www.edinarealty.com/marc-cutter-realtor/homes-for-sale/707-River-Street-Taylors-Falls-MN-55084-154138266"]
[contentcards url="http://www.navicamls.net/displays/?n=253&i=1765214&k=2yff"]

Thx!

Bug with non-absolute image paths

To reproduce:

Embed the following URL via shortcode:
http://www.dramaten.se/Repertoar/Beckomberga/

Result: The image is broken and links to:
/Global/Repertoar/Beckomberga/BOB_lans_P_940X608b.jpg

Here is that meta property:

<meta property="og:image" content="/Global/Repertoar/Beckomberga/BOB_lans_P_940X608b.jpg" />

If we find a non-absolute path, we need to prepend the domain to it.

Skin detection system

Skin detection system, similar to Themes (based on a comment block in stylesheet)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.