DNN 2SXC tokens how to add in editor - token

I'm new to 2SXC I'm trying to inject basic content in the Wysiwyg editor, using a token, but have so far been unsuccessful. This is so I can easily add inline content. Like our operating hours are [Content:Operating Hours].
Using [Content:Title] is not working. What I'm I missing?
Using latest Dnn and 2sxc.
This could be either in a Basic content block already or in a plain normal content block.
Your help is appreciated.

So I'm not sure what you are trying to achieve.
My best guess is that you are trying to insert other content-block into a rich-text field.
If this is what you are doing, then you should look at the Inner Content feature
If you get the Blog App you can see it in action.

Related

Printing a ticket in xpages

In a xpages application I need to mount a label with a certain layout, analogous to the layout of a ticket. Searching, I have verified that the most used practice is to use openoffice to design the odt model and in java to use bilbiotec to JOD Reports. Do you advise to follow this line yourself, or do you have any suggestions?
I would concur with Marcus. The way forward is PDF output. There are a couple of ways to do this, depending on your constraints.
When user must design every aspect of the ticket using openoffice is a suitable approach, however you need a headless openoffice install for the rendering
If everything can be code, then PDFBox is a good way to go. Wrap your code into a managed bean
The middle path would be XSL:FO and Apache FOP. It allows alteration of the layout by providing a different style sheet. I wrote an article series outlining that approach.
Let us know what works for you!
There is also the POI4XPages plugin. You could design your form with Word and then use placeholders to populate the document and output as a pdf.
See https://poi4xpages.openntf.org/main.nsf/project.xsp?r=project/POI%204%20XPages/releases/E80C4FC9FB07E1E4852580E3006E02C7
Download the latest version (1.4) at http://p2.openntf.org/repository.nsf/home.xsp/poi4xpages/snapshots
Howard
I was able to solve my problem, because I discovered that here in the company there is the abcpdf software. Through a web service that uses the APis of this software, I pass the html code of the ticket and the web service returns the pdf document in an array of bytes. I created a managed javabean to consume the web service and display the pdf in the browser.
Thanks to all who have contributed in some way with suggestions.

How iOS Google Now can show different card template

I wanted to know the technology decision behind the iOS Google app.
As we can see, in the app's Google Now feature it renders many different card templates for different scenarios, and those templates seems to be very flexible based on server inputs.
I was wondering if this is implemented all based on HTML5? or they just have many templates built in and render them locally? I'd vote for the HTML5 route but not sure if this still involved some native code to make it more responsive?
Thanks!
As we (well, most of the community) are not Google employees we can't tell you what they really did, but I'd say that it is possible to do this dynamically in the app.
We did develop something similar that responds to definitions sent by the server and transforms them to custom designed forms following basic rules.
Google reuses the design of those cards for different plattforms, the easiest solution should be showing some WebView and using HTML5.
I agree with Kevin, as this answer is entirely based on personal opinion, too.
The way I would go is to create a card class which will load some JSON data and format it with HTML and CSS. Looking at each card it would be hell to format things that way natively. I mean, attributed strings is not the way to go. Too much logic for deciding which card get a bigger text or a picture.
Additionally, the top header is most likely "localized" as well, so you get the location and load a localized image. But that is Google by nature.

I need Help a finding text editor that can upload and save images to file and database

I'm new to rails and could use some help choosing the right rich text editor. I would like visitors to be able to add content (text, images, and video) to the site using one  rich text editor form. Once submitted by the visitor I need to be able to sanitize content, save images/video to public folder, and save text and the path to those images/videos to the database for future retrieval. Is there a gem or combination of gems that can help me accomplish this. 
I've already looked into tinymce, ckeditor, and mercury but none seems to meet my needs. Tinymce and ckeditor and their plugins require the URL of the image which means that users would first have to upload the image and then know the path to it. That's a little to complicated for my audience. Mercury is based in html5 and is currently unstable depending on the browser. Are there any other options out there?
http://www.queness.com/post/212/10-jquery-and-non-jquery-javascript-rich-text-editors
I didn't look to deeply, but I'm assuming one of these jquery/javascript plugins is a WYSIWYG HTML editor.
Once you've got a good client side HTML editor running, the next part is parsing the HTML when sent to the rails app.
http://www.rubyinside.com/nokogiri-ruby-html-parser-and-xml-parser-1288.html
I've never used Nokogiri, but it's name is very familiar, It seems to be used a lot.
Sanitization is baked into Rails. The default sanitize will strip out ANY HTML, but you can call sanitize telling it which HTML elements NOT to block. Assuming you parse out the HTML you allow to pass through sanitize, using Nokogiri (or whatever HTNL parser you find), you'd be manually santitizing those elements as you extract values from them.
The tricky part would be eliminating the 'file select' operation on the client side as the user needs to select a local image to place in the HTML document. I don't think you can eliminate it, but hopefully HTML editor makes it as simple as possible. There not really much you can do about it, if the user will add one of HIS images to an HTML document he'll upload, he'll HAVE to select it at some point.
This is the closest I've come to something that you describe, I'm also looking for something similar so I'll keep you posted :)
http://youhack.me/2011/07/07/create-a-facebook-post-to-wall-system-using-php-and-jquery-part-2/

Using Drupal to do what Digg Does

I'm trying to create a site where, like Digg, a user can submit a link and using ajax it attempts to pull the metadata from the page into a title and description field. The user can change either of these fields then submit the content.
Ideally a module already exists. I tried playing around with Feeds, but I'm not sure if I'm looking in the right place.
I probably have to create my own custom module.
Any suggestions? Can I tap into the Feeds API just to parse the url then take the results and do all the mapping myself? Assuming I want to create my own form and bring in my own ajax.
You could probably do that with Feeds, but I think it might be overkill and could be difficult to configure.
You could do what you're looking for in a relatively small custom module using hook_form_alter to customize the submission form, arg() to determine the URL being submitted, drupal_http_request to retrieve the page, then the Form API's #default_value setting to pre-populate the field(s).
The Prepopulate module does a lot of what you're looking for. If it provides hooks (I'm not sure if it does) all you would need to do is add the drupal_http_request, to handle fetching the metadata.
In Drupal it's called Drigg ;). It is supposed to a nice Drupal module to get the functionality of Digg. It will be worth a try I suppose.

How do i make a simple web based notepad application

I have to make formatting available for a text box in a web based application just like the options available here to make selected text bold or in italics. I don't know where to start. can anyone please guide me.
Thanks
Why reinvent the wheel? Use something that already exists:
TinyMCE
CKEditor
Here's a list of ten different rich text editors that will do what you need.
http://www.queness.com/post/212/10-jquery-and-non-jquery-javascript-rich-text-editors
Depends on what you're going to be coding in, but I'm sure most languages have built-in types for text boxes that can handle formatted text (not unlike the one I'm typing in right now), and probably have a method that returns the contents of the box.
All you'd need is to figure out is the format code, if you want to store this text and open it elsewhere.
If you want to create from "scratch", you can use any JavaScript framework to ease your work. There are many "good" frameworks out there:
jQuery, ExtJS, GWT, YUI, etc. Just choose the one that suits to your need.
http://en.wikipedia.org/wiki/Comparison_of_JavaScript_frameworks

Resources