Open Graph - can I publish an action just to Ticker and Timeline (not to the News Feed)? - publish

I'm trying to post an action via open graph, but I prefer it doesn't show up in the newsfeed, but rather only the ticker and the timeline only.
Any way that can be achieved?
Thanks.

Found it - there's a "no_story" param that will just post to timeline aggregations but that will disable newsfeed posting. Unfortunately it'll also disable the Ticker post too.

Related

React router v6.0.0-beta.1 go back / pop history

I am trying to implement "go back" functionality for a page that could be access from n different urls.
Example, all the following URLs will link to abc.com/b1:
abc.com/a1
abc.com/a2
abc.com/a3
abc.com/a4
...
abc.com/an
From abc.com/b1 I want to support a link that takes you back to the previous page you visited.
My first attempt is to use:
...
const navigate = useNavigate();
navigate(-1);
...
However, if you land straight in abc.com/b1 navigate(-1) will likely take you outside of my application into some other site, or browser about:blank.
What is the best approach to implement such functionality?
is there a way to access the history length to check wether we should navigate(-1) or push a new page?
should I pass additional state/query from a pages to b? so b knows how to go back? this seems like overkill.
Thanks.
I was with the same problem, but I finally found a solution that worked for me.
I'm using the react-router-dom#6.2.1.
// Simply return to the previous page or to the initial route
navigate('..')

How should we use google analytic script in django?

Can we add google analytic script in tag and push it to the GitHub or we should keep it secret i.e. add it to the .env file and call in .
When I tried by the second one it appears in the source page as it is and also not working properly.
I would say there is no meaning of hiding it because it is also shown when 'view page source' is clicked. All you need is a simple filter. It will only include traffic on your domain, protecting yourself from any data corruption when people hijack your Google Analytics Property ID.
To find your filters:
Go to your Google Analytics standard reports
Click on the “Admin” button in the top right
Click on “Filters”
Click “+ New Filter
Then use these settings for your filter:
Select “Create New filter for Profile”
Name your filter with something snazzy like “Hacking Defense”
Select “Custom Filter”
Select “Include”
For the Filter Field, select “Hostname”
If your site is LarsLofgren.com, you would define the filter pattern
as “larslofgren.com” and make sure to include a “\” before any “.”
Pick “No” for case-sensitive
At the end of the day, your analytics id will be visible on your website. So, I don't think you should make an effort to hide it.
Just add it to your base template and you should be ready to go :)

How to set focus on tab in tabcontrol in URL

I am trying to call a page in my customers webapplication (Exact Synergy Enterprise)
This is the link: http://someserveridontdisclose/Synergy/docs/CSCANEduCourseCard.aspx?ProjectNr=ACPGINTV
Within this page is an Ajax TabContainer with several TabPanels. One of them is called 'Doelgroepen'
I dont have the source for this application, as i am not the developer of it. We only develop custom extentions to it.
Here's the question: Is it possible to focus on one of the tabs USING ONLY AN URL? If so How?
Thank you very much for your thoughts about this.
try to set with javascript. you'll have to write your own js to get index number you want from url, then set like this
$find('<%=TabContainer1.ClientID%>').set_activeTabIndex(2);
http://forums.asp.net/t/1127834.aspx
http://www.aspforums.net/Threads/420684/ASPNet-AJAX-TabContainer-Set-Active-Tab-Client-side-using-JavaScript/
If you do not have access to the code and if this is not part of the requirement / design specification for the application you are using (ie: what you asked the developer to do), then the answer is No.
The control does not have "native" support for URL tab selection. There needs to be specific code in the application in order to handle this.
It is however very easy to implement, if you absolutely need it, it shouldn't take much time (about 15-30 lines of code, depending on how many tabs/urls combination you need).
You can find a running sample of the AjaxControlToolkit Tabs control at the following link (the available functionnalities are described in there):
http://www.asp.net/ajaxLibrary/AjaxControlToolkitSampleSite/Tabs/Tabs.aspx
If the TAB has an ID you could make it visible by adding '#tabid' to the URL.

Forcing popup when coming from external websites (e.g google)

I work for a restaurant guide in the NW of the UK and we basically have featured restaurants (the ones who pay a monthly sub) and non-featured restaurants (the ones who get a basic free listing).
We were looking to get some kind of popup appearing on the non-featured restaurants, but only if they came from an external site, e.g Google.
So the steps would be:
1) User goes to google and puts in "name of unfeatured restaurant"
2) Our company comes up with the basic listing of that restaurant
3) User clicks the link but is then presented with a popup of featured restaurants
But, we would only need the popup to appear if the user has come from an external site. So if they were they came internally from our website the popup wouldn't show.
We use ASP at work and I was thinking it may possibly need some kind of a variable being passed through, or maybe something to do with cookies but I'm not an expert on the ASP side.
Hope someone can help on this :)
To see where a user came from you can try:
<%=Request.ServerVariables("HTTP_Referer")%>
This would contain the referring URL. if you want to use it on subsequent pages, you'll have to store it ofcourse in a cookie or session variable.

Time-Delayed MySQL "Update" for More Realistic Tally of Online Video Views

I'm creating a video embed page for a real estate site, where a user can go to watch a video tour of a given home. There is no other reason to visit that particular page, so I figured that I could use a simple MySQL Update to a "video view tally" column for that homes's row, which will update views=views+1 each time the page is loaded.
That's easy enough, but I want to give as realistic a "view" count as possible, so I'm trying to come up with a way to have that view tallied ONLY once the page has been loaded for a set number of seconds (say, 30).
Any thoughts on a good way to handle the timing aspect? I'd like to avoid javascript, if possible, but I'm open to if it it's handled simply enough.
Unfortunately the only way you will ever know if the page is still active is to have a client-side technology (like JavaScript) tell you that it is.
You can add a "counter" page that isn't meant to be viewed directly, but instead is accessed via JavaScript after a 30 second page timer has expired. The act of JavaScript accessing that page will trigger the counter logic.