I am trying to find a way to embed bugzilla's tabular reports in another HTML document. Does anyone know a way to do this? All embedding must happen client-side. I don't have access to backend web server to implement parsing/inlining of contenting. I figure, I could use an iframe, but i haven't found a way to tell bugzilla not to emit its standard header and footer.
Does anyone have experience embedding bugzilla reports into an HTML document on the client side?
Here is an example report... https://bugs.eclipse.org/bugs/report.cgi?x_axis_field=bug_status&y_axis_field=bug_severity&z_axis_field=&query_format=report-table&short_desc_type=allwordssubstr&short_desc=&classification=Technology&product=Sapphire&target_milestone=0.3&longdesc_type=allwordssubstr&longdesc=&bug_file_loc_type=allwordssubstr&bug_file_loc=&status_whiteboard_type=allwordssubstr&status_whiteboard=&keywords_type=allwords&keywords=&emailtype1=substring&email1=&emailtype2=substring&email2=&bug_id_type=anyexact&bug_id=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&format=table&action=wrap&field0-0-0=noop&type0-0-0=noop&value0-0-0=
You want the &format=simple parameter on your buglist request, e.g.:
https://bugzilla.mozilla.org/buglist.cgi?bug_id=1000,1001,1002&format=simple
Put a URL like that (to your Bugzilla, naturally) in the src attribute of an <iframe>.
Gerv
A little javascript to request the html and enough parsing to find the right snippet might be your only option.
http://ejohn.org/blog/pure-javascript-html-parser/ might be a good parsing option.
Related
I have built an application using React and .Net Web API. I'm pretty new at all this and without any previous knowledge on meta tags, I am now stuck on trying to implement a Facebook Share Button using dynamic meta tags.
I tried using react-helmet and react-snapshot but Facebook ignores the dynamic tags, and only accepts the url of the page. Now I've heard that it's possibly doable to replace the meta tags using the server side, but I'm not so sure I know how to do that in .Net.
I'm also aware of the option of using a framework such as Next.js, however, being so short on time, I was wondering if there exists a solution that doesn't include migrating.
Is there a way of making this work with the technology I am already using?
If anyone has had this problem before and is willing to help, or just knows the solution, I'd highly appreciate it! Thank you!
How to attach one of more files when creating web-to-lead from the code. Solution should not be any of the following:
Visualforce pages in Force.com Sites
Using Force.com web services API implementation.
You can't. Consider cross-posting this to https://salesforce.stackexchange.com/, maybe somebody has a brillant idea.
There's idea you can upvote, looks like they'll have something in Summer'22. Until then you need VF page exposed as Site, Aura component exposed with Lightning Out or a proper API integration. Can you make-do with "InboundEmailHandler"? Body of email could be JSON or something, attachments you could save? 36 MB limit though.
Web-to-Case and Web-to-Lead support only simple forms. Normal HTTP way to mix forms and binary data is to use "multipart/form-data" but Web-to-Case doesn't support it: https://help.salesforce.com/articleView?id=sf.customizesupport_web_to_case_notes.htm&type=5
There are tricks like upload the file somewhere else (another website you control) and just display link to it on the Lead... But it's not true file upload to SF.
I have a content type and C# Razor template for a simple page hero built using 2SXC. I also have a DNNSharp MyTokens with a simple token that looks like this: [DBQ:EligibleForExam]
Using the regular DNN HTML module, I can put my token in the source and it renders the value of the token.
I want to display the value of this DNNSharp MyToken inside of the C# Razor template but it doesn't show the value. Furthermore, I want to perform an if else statement on this value.
Here's what I want to do:
#if [DBQ:EligibleForExam] = 1 {
<p>You are eligible for the exam</p>
}
How can I use DNNSharp MyTokens in 2SXC?
In this case you can choose between going all the way 2sxc or all the way DNNSharp :
- scenario 2sxc: translate the DNNSharp token to 2SXC. I don't know what's behind that code but I guess it is some kind of SQL select and/or filters. In 2SXC you can create content types with SQL as a source. In the query designer, you can filter these results.
- scenario DDNSharp: in MyTokens you create a razorscript or HTML and make a token out of that. I don't think you hit any barriers soon following this path.
The core problem is that tokens are not well architected in DNN, there is no officialy "global" token system which knows about the DNN Sharp tokens.
I believe it should be easy to do though: I'm pretty sure there will be some documentation on DNN Sharp how to use their tokens in any c# or MVC page. Probably just 2-3 lines of code. So best check their docs.
2SXC does not render DNNSharp tokens like html module or EasyDNNSolutions do.
It would be an awesome thing as MyTokens and 2SXC are both very powerfull.
But maybe we can fix your problem within 2SXC itself or within DNN Sharp/HTML
What are you trying to accomplish? You can share the case / code here. Or if you feel this is beyond the Q&A setup that Stackoverflow is, you can send me an email.
Cheers
Tycho
I am working on integrating a 2sxc content WebAPI feed into a ReactJS application.
I have managed to get a JSON feed of data into the application, and am in the process of mapping out the data.
I'm wondering what the best practice would be to "resolve" a URL which is coming through as a DNN Page/ Tab ID.
Below I will showcase the various points this is referenced...
First the Setup of the entity / data types...
Then this is an example entry with the data filled out... The page link / URL is set up to point to another internal page on the DNN website:
Finally you can see this data item come through as a JSON feed via the 2sxc API:
What is the best way to convert this piece of data into a URL which can be used in a SPA type application?
There isn't any "server-side" code going on, just reading a JSON feed on the client side...
My initial idea would be to parse this piece of data in JS, to extract the number then use something like this:
http://www.dotnetnuke.com/tabid/85/default.aspx
http://www.dotnetnuke.com/default.aspx?tabid=85
I was hoping someone with more experience would be able to suggest a better / cleaner approach.
Thanks in advance
If you were server-side in Razor you'd be doing something like this:
#using DotNetNuke.Common
View List
XXXX = Dnn.Tab.TabID or define a string with the tab id you want
I seem to have a vague memory that I saw somewhere that Daniel (2sxc) has a way to use Globals.NavigateUrl() or similar on the client side, but I have no idea where or if I did see that.
The Default.aspx?tabid=xx format will certainly work, as it's the oldest DNN convention and is still used in fallbacks. The urls aren't nice, but it's ok.
The reason you're seeing this is because the query doesn't perform the automatic lookup with the AsDynamic(...) does for you. There is an endpoint to look them up, but they are not official, so they could change and therefor I don't want to suggest that you use them.
So if you really want a nicer url, you should either see if DNN has a REST API for this, or you could create a small own 2sxc-api endpoint (in the api folder) just to look that up, then using the NavigateURL. Would be cool if you shared your work.
Our team is constantly working on an angular application, and every week or 2 we update it with new features or correct some bugs that came out.
We are using a C# backend with webservices.
QUESTION: When we update the application on the server, we sometimes (this doesn't happen all the time) get the problem that user is still seeing the old HTML and functionalities. What is the way to solve this?
I didn't find this on google, maybe I'm not looking for the right terms,
any help is appreciated.
Users have to clear their cache to get the new version of the application.
What you are seeing are cached copies of the JS files (possibly HTML partials too).
When the browser parses the HTML page, it makes the request for getting the JS resource and looks at various information before deciding to retrieve either the cached copy (if any) or whether to query the server again.
You can find some extra details on the Google fundamentals on HTTP caching
A solution I have been adopting myself is to set the cache headers to cache the file for a very long period, and then use tools in the build to version the file either on the filename or with a request parameter.
I have used grunt-cache-breaker and found it to serve well for this purpose. I know there is a gulp equivalent too
The most common way to make sure cached versions of your javascript aren't used is adding the version as a parameter in the reference to the script like so:
<script src="/app.js?v=v1.0"></script>