I'm trying to display some data from the accounts-twitter package. I need the user's profile pic, username, and name, all from Twitter. I've checked using meteor mongo to see that this data is in there. Profile.html is where I store my templates for this:
<template name="profile">
<div class="col s4">
<div class="z-depth-2">
<div class="card blue-grey darken-1">
<div class="card-content white-text">
<img class="circle-profile center-align" src="{{services.twitter.profile_image_url}}" style="border-radius: 50%" width="50px" height="50px"/>
<br>
<span class="card-title">{{profile.name}}</span>
</div>
<div class="card-action">
View Profile
</div>
</div>
</div>
</div>
</template>
<template name="display">
{{#each users}}
{{> profile}}
{{/each}}
</template>
I also have profile.js that fetches the data from the collection using a helper:
Template.display.helpers({
users: function() {
return Mongo.users.find();
}
});
When I look at my main area, the profiles I have in the collection aren't showing. Please advise. Thanks in advance!
From the docs
The profile is published by default and only updatable by the current user. The services, where the Twitter information is stored is not because that would be a security issue since it contains the authentication tokens. What would probably work best is in the onCreateUser() method copy those values to the profile so they are published.
You could also publish only those fields you need from the services but I personally like to keep that separate since it contains sensitive information.
Related
I have a client that uses hubspot for their tracking and thank you pages. I have created a landing page using bootstrap and within the page I have two forms. Both forms are the same and I want them to go to the same thank you page. The client has provided me with an embedd code but I am not sure how I can bridge the gap. Below I have listed my form code and the embed code. I basically want the user fields to be submitted into hubspot and for it to trigger the thank you page but I am not entirely sure this is possible. Any help would be appreciated.
<div class="col-lg-12 contact-form">
<div class="container">
<div class="formContainer">
<form role="form">
<div class="form-group">
<div class="col-sm-6 left-field">
<input type="text" class="bottom-form" id="firstname" placeholder="First Name">
</div>
<div class="col-sm-6 right-field">
<input type="text" class="bottom-form right-field" id="lastname" placeholder="Last Name">
</div>
</div>
<div class="form-group">
<div class="col-sm-12">
<input type="email" class="bottom-form email" id="email" placeholder="email">
</div>
<div class="col-sm-12">
<button type="submit" class="submit bottom-submit">Download Now</button>
</div>
</div>
</form>
</div>
</div>
</div>
Here is the hubspot embedd code.
<!--[if lte IE 8]>
hbspt.forms.create({
css: '',
portalId: '2030148',
formId: 'd9005302-a859-4a39-9d47-74d8a1d25fb0'
});
Are you just looking to set the redirect with the embed code? If so, here is the addition to the embed code:
portalId: 'xxxxxx',
redirectUrl: 'url goes here',
formId: 'd9005302-a859-4a39-9d47-74d8a1d25fb0'
I actually figured out a proper solution without having to do any redirects or hairy coding.
First I setup a local host, which was my biggest issue, this helps with getting the actual hubspot form to show within my page (using a local show the embedd code does not appear, although obvious to others, it took me a sec). Oh, I should mention that the code is not necessary.
Once you have it showing you basically inspect the element and then add to the classes that hubspot spits out get it to look that way you want too.
If my company do it product (website, design, app), what should I apply Microdata to my HTML, if HTML structure look like below:
<div>
<h1>Company name</h1>
<p>Below is our portfolio</p>
<div itemscope itemtype="http://schema.org/???">
<h2>1. Website name</h2>
<p>Website info here...</p>
</div>
</div>
It depends on what this content is exactly about.
If it’s something your Organization offers (so the portfolio item is a placeholder for what your business offers), you could use:
makesOffer → Offer
If it’s something your Organization owns (so the portfolio item is something your business wants to show), you could use:
owns → Product
From the perspective of the CreativeWork, you could link to your Organization using the properties author/creator, contributor, copyrightHolder, provider, or publisher.
1- You can use, Like Unor said, the Organization, but there is some specific types of organizations.
You can use LocalBusiness and in your case, I will use another specific type of LocalBusiness wich calls https://schema.org/ProfessionalService. (provider)
An exemple of use :
<span itemscope itemtype="http://schema.org/ProfessionalService" style="display:none;">
<span itemprop="name">company name</span>
<span itemprop="description" style="display:none;">Description </span>
<img itemprop="logo" src="http://logo-url" alt="">
<span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
<span itemprop="streetAddress">Address</span>,
<span itemprop="addressLocality">Locality</span>
<span itemprop="addressCountry" >Canada</span>
<span itemprop="addressRegion">State_or_province</span>
<span itemprop="postalCode">Postal_code</span>
</span>
<span itemprop="geo" itemscope itemtype="http://schema.org/GeoCoordinates">
<meta itemprop="latitude" content="45.5354467" />
<meta itemprop="longitude" content="-73.505216" />
</span>
</span>
I advise you to use the GeoCoordinates, because Google should promote your web site in your local area.
You can hide this information for users by an style="display:none".
2- For your portfolio, you have another schema : CreativeWork
3- For the use of offer : you have to indicate the price that could be show directly in search results. But in your case, I don't think you want it :).
Microdata can change the appearance of your page directly in search results. For more information, Google Developers
I have a website where people can compare driving schools. I've added alle the details (name, description, location, pricerange, etc.) I know about these schools to their pages on my website, using the schema.org markups.
Since a few weeks, people can also buy (read: book) their first driving lesson offered by the schools on my website, directly on my website. I was searching for a way to add this to the schema.org markup at my pages, but I don't really know what to use in my case.
I think of the two following possibilties. Can you tell me which one I should use? Or that you may think of a better solution?
<div itemscope itemtype="http://schema.org/LocalBusiness">
<div itemprop="name">...</div>
<div itemprop="description">...</div>
<div itemprop="priceRange">...</div>
<div itemprop="makesOffer" itemscope itemtype="http://schema.org/Offer">
<div itemprop="name">...</div>
<div itemprop="price">...</div>
<div itemprop="priceCurrency">...</div>
</div>
</div>
Or
<div itemscope itemtype="http://schema.org/LocalBusiness">
<div itemprop="name">...</div>
<div itemprop="description">...</div>
<div itemprop="priceRange">...</div>
<div itemprop="owns" itemscope itemtype="http://schema.org/Product">
<div itemprop="name">...</div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<div itemprop="price">...</div>
<div itemprop="priceCurrency">...</div>
</div>
</div>
</div>
At last, I was looking for a better schema type for driving schools, but I don't think they have specified driving schools. Do you think it is better to use ProfessionalService instead of LocalBusiness?
I think both of your examples are possible.
If you don’t have any specific requirements from consumers you expect to make use of your markup, I’d go with the first example: LocalBusiness → makesOffer → Offer.
It seems that you don’t really need the Product item, as you are only using the name property, which could be used on the Offer instead.
We are using magento 1.8.1 and hosting it both locally in an iis/mysql environment and also testing in an ubuntu lamp environment, so we can verify it is not an iis issue. It happens on both environments.
I got up to the point of integrating the product listing page, where we want to show product reviews and the product review fonts, so users can give their reviews without clicking on a link to go to a different page to add it. I managed to load the product reviews blocks. At first the form element of the add to product button was mixing up with the product review form, which i solved by closing the previous form before starting the review form. I can see in Fiddler the request going through and the action on the form element looks like this
http://localhost/index.php/review/product/post/id/2/
While this will actually make the browser send the request (as seen on fiddler, with the right amount of parameters), the review is never stored in the database, so i cannot see it in the pending reviews part of the admin section. After examining both my store's html source and the online demo, i could see there was a hidden form field on the official demo storing the form_key , which i added since, but it still will not work.
Any hints where to look at?
the whole reviews form block looks like this:
<form action="http://localhost/index.php/review/product/post/id/2/" method="post" id="review-form">
<fieldset class="">
<h3>You're reviewing: <span>Powermonkey extreme 2</span></h3>
<ul class="form-list">
<li>
<label for="nickname_field" class="required"><em>*</em>Nickname</label>
<div class="input-box">
<input type="text" name="nickname" id="nickname_field" class="input-text required-entry" value="">
</div>
</li>
<li>
<label for="summary_field" class="required"><em>*</em>Summary of Your Review</label>
<div class="input-box">
<input type="text" name="title" id="summary_field" class="input-text required-entry" value="">
</div>
</li>
<li>
<label for="review_field" class="required"><em>*</em>Review</label>
<div class="input-box">
<textarea name="detail" id="review_field" cols="5" rows="3" class="required-entry"></textarea>
</div>
</li>
</ul>
</fieldset>
<div class="buttons-set">
<button type="submit" title="Submit Review" class="button"><span><span>Submit Review</span></span></button>
</div>
</form>
We have the same problem, and I solved it.
Magento has a form key when submitting any information to the database. To generate the form key, add this code:
<?php echo $this->getBlockHtml('formkey') ?>
We are developing a new site and I'm keen to implement rich snippets and more descriptive meta data for our products and services pages in the form of Rich Snippets.
My problem is that our products and services cannot be purchased directly from the website as they are bespoke and custom built based upon users requirements. As a result they don't have a price and stock level.
I notice from the Google guidelines that they state:
The product should be available for purchase directly on the page
My question is, what is the best and most appropriate way to use rich snippets to describe these products and services? Can I use rich snippets at all to describe these products and services?
Consider using schema.org/AggregateOffer for Product Rich Snippets. Although main use case for it is marking one product available from different sellers, it seems suitable for you as well. It allows to indicate lowest and highest price - I guess you have some price limits even for bespoke products.
If you have reviews for those products on your site Review Rich Snippets are applicable for you. Use schema.org/Review or schema.org/AggregateRating for this.
Example for both:
<div itemscope itemtype="http://schema.org/Product">
<img itemprop="image" src="cute_dress.jpg" />
<span itemprop="name">Very Cute Dress</span>
<div itemprop="aggregateRating"
itemscope itemtype="http://schema.org/AggregateRating">
<span itemprop="ratingValue">87</span>
out of <span itemprop="bestRating">100</span>
based on <span itemprop="ratingCount">24</span> user ratings
</div>
<div itemprop="offers" itemscope itemtype="http://schema.org/AggregateOffer">
<span itemprop="lowPrice">$1250</span>
to <span itemprop="highPrice">$1495</span>
</div>
</div>
will give you
Breadcrumbs is another option for you. Use data-vocabulary.org for this purpose since breadcrumbs in schema.org are messy and incomplete.
Example:
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="http://www.example.com/dresses" itemprop="url">
<span itemprop="title">Dresses</span>
</a> ›
</div>
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="http://www.example.com/dresses/real" itemprop="url">
<span itemprop="title">Real Dresses</span>
</a> ›
</div>
<div itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
<a href="http://www.example.com/clothes/dresses/real/green" itemprop="url">
<span itemprop="title">Real Green Dresses</span>
</a>
</div>
will give you