Should instant view be created for each page? - telegram

We have a news web site and want to have telegram instant view for all news in our web site.
I have logged in at https://instantview.telegram.org/ and create a template for a news. by using its created link in this site the instant view button for this news is shown in telegram. but not work for other news. Should I create the link in https://instantview.telegram.org/ site for each news?

You might have one of two problems.
1) According to the last abstract of Instant View:
This means that, as a website owner, you can create a template for your page and publish t.me/iv?url=... links with the corresponding rhash to your Telegram channel — and your subscribers will be able to view your articles in the Instant View format right away.
Long story short: rhash generated for your news page could be applied to any page from your site. So make sure you have changed the url param in t.me/iv?url=...&rhash=... link while creating Instant View button.
2) Check the first step in every template in Sample Templates Page. It describes which pages get Instant View and which don't. Maybe you've created your template for a single news page, not for all news pages at the same level.
E.g., the ?path: /.+ condition will provide Instant View for every page except the root page.

Related

How do I remove form pages from browser history in ASP.NET Core

I have a simple ASP.NET address book application.
In the application the user can:
Get a list of contacts
Click a contact to go to an edit-page
Edit the contact
Press save and go back to the list
Now: If the users clicks the browser back button at this point in time the application goes back to the edit page - which is NOT what the user expects (the user expects to go back to the page before the list).
The general problem is these temporary/edit pages that you would never want to navigate back to - is there a pattern for handling this?
I can think of two solutions
Don't have separate edit page but use javascript to show edit form on detail page
When serving edit page check, that referrer header is not from contact list but from contact detail. If it's list page url then redirect to detail page
Imho option 1 is cleaner and option 2 probably easier

Umbraco Partial Views with meta-tags

Let's suppose I have a page with ten products. When I click a button on one of the products it opens a pop-up (partial view) which has some share buttons. When I click 'Share on Facebook' it needs to have the correct meta-tags (title of the product, description of the product and image of the product).
Is this possible and if so, how?
I ended up doing a view and a page from umbraco on which it renders the view from the controller. It adds the correct meta-tags, dynamically.
The user clicks share and that's it, I just serve facebook's crawler a product page which the user won't see. Then when someone clicks the shared url from facebook it will get a redirect to my desired URL.
Previously tried with javascript and ajax, or even alter the master template tags from the controller and even checking if facebook's crawler gets on the website, only the last one worked partially but yuck...

How to preview WooCommerce endpoint pages

How can I preview or view WooCommerce endpoint pages such as the /order-received/ page without placing an order each time I want to view it?
I know how to edit the contents of WooCommerce endpoint pages, but I find it hard to work on the front-end if I can't preview the page.
There is no need to place a new order each time you want to preview the endpoint page.
Just place the order once and store the endpoint URL somewhere. You can re-visit the endpoint page as often as you want or even refresh the page after making changes in your code/styling.

Do I need plugins or custom node types?

I'm developing a website for my online start up. I've finalized what will be needed for me in Drupal. I just have few questions.
The Concept:
My website brings young musicians & album reviewers to one place. Idea is that, every reviewer can choose 2-3 albums of any musician and we'll mail him CDs of those albums for free. In return we expect them to review those albums. We also offer certain services to musicians.
My website contains the following pages:
Register Page: where a visitor can register either as a musician or as an album reviewer.
Login & Forgot password pages:
Add/Edit Musician's Profile Page: After login, musician can enter his profile information (photo, little biography & albums => for
each album he'll enter all the album details.)
Add/Edit Reviewer's Profile Page: After login, reviewer can enter his profile information (some personal information along with
address)
Musicians Page: A public page which lists all the musicians and on clicking on a musicians name/photo he'll be taken to a public
Musician's Profile Page: which displays information that was previously entered by Musician in his dashboard)
Albums Page: A public page which lists all the albums and on clicking on a album name/photo he'll be taken to a public Album
Information Page: which displays information that was previously
entered by Musician in his dashboard)
Addresses Page: After login, reviewer can manage (add/edit/delete) addresses to which he wanted the Album to be
shipped.
Submit Review Page: A page where reviewer will submit his star rating & review for the album that he got in mail.
Shipment approval Page: Admin (we) after login, can approve/reject the requests made for shipment of CDs by reviewers
Reivew approval Page: Admin (we) after login, can approve/reject the reviews submitted by reviewers. when approved this
will be shown up in Recent Reviews Page: of Musician (in the
dashboard) and also in the corresponding page of that Album
Few Static Pages like: About us, Home Page etc.
As you can observe, most of the pages contains forms (containing UI elements like file upload, text box, select etc). Information has to be sanitized, verified and then store in a database. This stored information has to be later retrieved for display on some other page.
I'm planning to use CMS Drupal.
Questions:
I need to build a theme with these 10-12 page types and using Form API, File API & Database API right?
I don't need Nodes, Fields, Custom Nodes, Taxonomy, etc because those are needed only to those in which case information will be updated by drupal admin.
But if I build the these 10-12 page types using the drupal API, how would I make any one to go to that page? I mean, these won't be taking any info from content section of dashboard. I'm confused here. Something is wrong. I'm unable to express it properly.
I don't need any plugins too, I guess. Right?
My Background: I've developed websites back in early 2000s. I know a lot has changed since then. For past two weeks I've updated myself with HTML5, JS, CSS3, jquery and others. I've also gone through wordpress and just for past 2 days I'm going through Drupal. I liked Drupal better.
You will likely need to read more into how Drupal works.
Here is what I would try:
Register Page: This is user module
Login & Forgot password pages: let Drupal handle it, user module.
Add/Edit Musician's Profile Page: This is a node type, maybe only editable by users with the artist role.
Add/Edit Reviewer's Profile Page:This is user profile.
Musicians Page: This is a view to the Artist nodetype.
Albums Page: This is a node type. Likely you will want to associate this with artist nodes through node reference.
Addresses Page: This is part of user ( a field or field collection in user profile )
Submit Review Page: This is comment for the album node type
Shipment approval Page: I would do it with a view maybe. This would depend on your workflow and module choice.
Reivew approval Page: This is the comment review function, let drupal handle it ( or find a module that you like )
Few Static Pages: Another nodetype, likely the basic page type.
If none of these made sense to you, read more into Drupal.
And the answer to the questions:
No you don't need to touch API with these requirement. Read on to find out how to do Drupal properly.
You most definitely would need node / fields /taxonomy and custom node type. User can create / update them too.
The thing that is wrong... is you need to read more into how to use Drupal
They are called Modules, and you will need it.
If you are determined, take the wild ride and read, read, read. Be ready to take 1-2 weeks of reading and practice.
Else, try to hire a Drupal Dev to help you get started. That could make it a lot faster. Like core functions you mentioned done within one day fast.

Google Analytics - Same URL mapped to two pages

I have my application configured with google analystics. Its a e-learning application in which i have students and instructors.
I want to analysze the home page clicks for both student and instructor. The problem is the home page for student is also available in instructor but as some other page means same URL but different locations.
Now, i have added the script in ONLY student's page. By doing this though i have mapped the URL for an instructor page as well, will that effect the analysis? Will the data collected for students home page be affected by click on same link for instructor ?
If you have a single page that both students and instructors go to, then yes, your data will all show up under the same URL, and you will not be able to tell which views are from students and which are from instructors.
If you have the code ONLY populating when a student is on the page, then yes, this will affect your reports. You will be able to see how many students are viewing the page, but you will not know anything about the instructors viewing the page.
There are 2 things you can do with the GA code to get your numbers:
1) Report a different URL or page name depending on who is viewing. By default, GA reports the URL as the page name, but there is an optional 2nd argument to the _trackPageview call on your page that lets you specify what you want the page name to be. This will make your pages reports show two different entries.
2) Populate a custom variable on the page. This will show all traffic to the same page, but you will be able to use the custom variable to see how much of the traffic is from who.
The accepted answer was for the Classic GA snippet. For the latest GA snippet (Universal), you'd want to go with this.
ga('send', 'pageview', {
'page': '/my-overridden-page?id=1',
'title': 'my overridden page'
});
See Overriding Default Values in the GA Docs.

Resources