How Do I add frontend edit feature to component? - joomla2.5

I followed this tutorial to build a component. Everything works as expected. Now I am confused on how to add an edit feature to the frontend. A uses (with appropriate rights) should be able to click an edit link and edit the data displayed by the component as well as add new data. Just like in the backend.
I have the feeling that I miss something obvious, but I couldn't get my code to work. I thouhgt, I could just replicate the backend code, but with no success.
Is there a tutorial or other hint you could give me?
Thanks
Sascha

I was right: I missed something obvious, because it's all there.
Look at this tutorial. It guides you through the process of integrating an editor to the frontend. But it also shows
how to display an edit form
and
save the data.
Best regards
Sascha

Related

How to take screenshots in python?

I've an idea and want to implement it.
But I'm not sure if it's gonna work. So, wanted to get your inputs.
I would like to take screenshots of a url.
Say, when I open a web-site www.espncricinfo.com , I would like to take screenshot of that page and save locally. This saved image can be converted to GIF later on.
Can this be achieved through python ? Any suggestions/inputs to make it ?
Updated
And also is it possible to capture screenshot in headless-browser ?
Any possibilities to launch the browser in headless mode (non-GUI) and then take the screenshot of particular area of web-page ?
To take a screenshot using python:
import pyscreenshot as ImageGrab
im = ImageGrab.grab()
im.save('path/to/image/folder/image_name.png')
im.show()
Yes and no, if you send a request with urllib you will get the HTML in return, which is step one to displaying a webpage. But you have to build that webpage from that with a browser engine, otherwise all you will see is a bunch of text.
There are some python libraries that can do this, such as pywebkitgtk, but those are probably not going to give you the best experience and support.
Another thing you could try is to use crod and firefox/chrome/whatever and then use python to automate the process.
Oh, and by the way, I strongly recommend upgrading to python3
I know it is a bit to late now, but just saw this question and in case anyone else is looking for a mighty tool, to do screenshots and also use headless browsers with python... I just want to recommend to look more deeply into https://www.seleniumhq.org/. There are many tutorials on youtube available. However, this is IMHO the most accurate framework to execute your task, IMHO. To make screenshots, you can then define the screen resolution etc.

Printing Ember.js page : templates not displaying

When I try to print my Ember.js page application, templates aren't displayed on the sheet (it only displays a big empty white section). Any explanations or solutions?
Thank you
You will need to use traditional media queries to implement the ability to print from your Ember app. As far as I am aware there, no one has created an ember addon to support print functionality at this time. (See here where it doesn't look like anyone has a good suggestion for a similar question.) I can imagine it would be difficult to support generic functionality for printing that looks decent across apps, which may explain why no one has attempted to create an add on at this time.

EmberJS email client example incomplete?

I'm just getting started with EmberJS and saw the "routing" example on the emberjs.com page. It takes the form of a mail client.
I've downloaded all the files (app.js, application.hbs, etc) but can't figure out how to get it to "work".
There seems to be missing an HTML as the entry point?
OR, if nothing is missing, how do I view this app within a browser?
Unfortunately, although this example makes its point (showing how you don't need a lot of code to do something that is traditionally complicated), you can't use the files directly without some tooling to compile the templates, for instance.
It is recommended for any new Ember project to use Ember CLI to do this work for you. You should check out the 'Getting Started'-section of their website, and then read through the section on using modules and the resolver, which will explain the ways in which the example you are looking at would be different.
The official Ember Guides are very good for getting started, and I'd recommend you check that out (make sure you read that modules-part if you're using ember-cli (which you should) before you go through the guides). Also, please join us on IRC on #emberjs if you have any questions that would need some more back and forth.
Welcome!

How to use Google Blink/Webkit to render HTML code

Sorry if the title somewhat ambiguous.
I'm buliding an app that recieve an URL then return the final HTML code (and save it for caching), after Ajax and other js feature executed (something like Phantomjs).
My language can call C++ code, so I think it would be nice if I can buid and use Blink/Webkit libary directly.
The issue is both Blink/Webkit document is too big.
UPDATE 1: Which API (Blink has many APIlayer) or a particular class I need to look at?
Do you know any example or tutorial I should look at?
Or any alternative simpler libary?
Thanks
Finally Chromium project have headless API in development with very good example which can be build using ninja, more information in their project at https://chromium.googlesource.com/chromium/src/+/master/headless/
A video from BlinkOn https://www.youtube.com/watch?v=GivjumRiZ8c&t=838s

How to make a website like apple.com/mac?

I know some javascript, html and css. However, i have no idea how could they make some website like http://apple.com/mac .
When I look at the source code of that sites, it looks like being generated by some program/ IDE. I guess people doesn't write all the code by their own using notepad in this case?
Can you suggest how people usually do (what steps/ tools/ IDE...) in order to start making a website like apple.com/mac ?
If you are an amateur website developer, I suggest using Dreamweaver as its WYSIWYG editor and also HTML5 / CSS3 support is great. If you want to stay just code editing, I'd advise Aptana Studio 3, again great code support. As for creating a site like Apple, it's a bit specific. Check out sites like http://net.tutsplus.com/ for tutorials on how to make sites.
How does the code look generated? Some JS is compressed - check out http://developer.yahoo.com/yui/compressor/ for an example.
To make sure you start off on the right end of the website developer spectrum check out:
http://html5boilerplate.com/
http://css3pie.com/
http://www.modernizr.com/
Also:
http://jquery.com
http://lesscss.org/
I'm missing out loads more here, there is so much to know. Don't focus on making a site like Apples, it sucks.
Well, first go yo the webpage!
Then right click and click view page source. Then type Control-A then type Control-C then put the code into your code then it will look like it (If you want to edit it change the code) Then you will have a webpage looking like the apple/mac page!