Does joomla store article/ modules text and image path in database? - ios

I wanted to create an iPhone app for a website which is created using Joomla 2.5. What I was thinking is to create RSS and pass that link in the iPhone app. However, for creating RSS, I was worried about from where should I get the articles text and images that are there?
Hence, I wanted to know: does Joomla store the article/ modules text and images path in a database? If yes, which table does it use to store all info?

Of course it's stored in the database ;-)
You should find all the data in the table #__content (replace #__ with your prefix).
The fields title, introtext, fulltext and images is probably what you need. Note that the images field is an JSON encoded string.

Related

Add images into rails article

With Rails 5.1 and a pgsql database: I have a pretty standard Article model with :title and :description. Users can make your typical text-only articles.
What if users wanted to embed a gif or image into the post, like between paragraphs? I see a lot of this type of format on other website blogs and I am not sure how to achieve this with Rails.
Note also I am using simple_format(article) to display, so any formatting done on creation should hold.
Any ideas?
There is actually quite a bit of work involved with this:
If you need to allow your users to upload images from their
computer, you will need to get your head around the Paperclip
gem (or similar). This will store the image on the server.
You'll want to determine how big can images be, what to name the
images once uploaded and what file formats are permitted to prevent
users uploading all sorts of files.
Next on the front-end, you can either use a rich text editor (eg. CKEditor or TinyMCE are the main ones) to embed the
IMG tag(s) into your Article text, or structure that layout yourself
(eg. "Always display an image before/after the article text"). Do
your images need captions? Do they need to be clickable?
Lastly, in your Show template, don't forget to use Rail's image tag helpers rather than your standard IMG tags. This enables you
to easily reference the images on the server without getting lost in
the asset pipeline.
There are some videos out there showing how all this is done, eg. https://www.youtube.com/watch?v=Z5W-Y3aROVE. Good luck!

what is the best way to implement interactive book in c#

I can upload large document as pdf file into web page no problem. but i want to use arrows to navigate the book pages not to upload the whole book at once as this may take long.
can any one help how to do this in mvc app with or without database? if database is necessary would Mongodb be a better choice? i do not want people to download the book; they can just read it online?
First you cannot prevent people to download your content if you visually display it BUT you can discourage them by making it difficult to do so.
That being said you wouldn't have a need a database to do what you want to do. You can but it's not necessary. You can simply find some library online that handle PDF such as iTextSharp cut the book in 1 PDF per page with it when it get uploaded so you have bunch of small files.
Then the trick is simple you query the PDF library to load the file Page1.PDF (arbitrary name) extract text format and output as text nicely has HTML. when the person click the link Page 2 then reload the page with the new PDF to use for display.
Doing so prevent the user from seeing or having access to the PDF file itself and if he want to download it all he will have to copy paste every single page manually or by code if he's a dev. Most common user wont go around copy pasting manually 300 pages because of laziness.
What i would personally do is each file uploaded i would create a folder with the name of the book and call the files 1.pdf, 2.pdf .... per page. Like that if i query the listing of directories i get the list of all books, and if i check the count of files in it i know the total page number. That would allow me to run all that without database.

Rails: upload a file OR store a url

I'm developing a form where I want to allow users to either upload a file, or enter a url to an existing file.
The idea is to allow users to attach various 'multimedia' files to entries, some of which may be files from their hard drives (think images, word documents, etc) and some may be urls (youtube videos, images on flickr, etc)
Any ideas on how I can accomplish this? I'm currently using carrierwave to handle file uploads, and it seems to work well, but I want to store url's as well.
What I will probably do is to have a drop down in the file upload form to select if the file is from the disk or from external url.
By default it will set to "from disk", and if they select external url, you could use some AJAX magic and hide the file upload text box and have a text box to use the external url/script etc..
in the table, you can keep another two columns,
1 - external url
2 - file category (external / uploaded file)
by that way you can distinguish the files and how they what to display in the view
HTH
Don't save the url unless you really have too. The thing is that when you save a url, you can't process it to create a thumbnail or multiple styles of the image. Also, when you display the images in a page you will have to make external calls and that can slow down the page or even worse, if the link breaks sometime in the future your users will see an empty image.
Which is also the case with youtube videos. However, with videos you typically want to store and display more information than just the video. You can have two tables - one for videos and one for images. In the video table you have title, desc, author, duration, embed code, thumbnail (image attachment).
You can download any image when a URL is given and save it like a normal file.
Using carrierwave -
#object.remote_image_url = "http://www.foo.com/file.png"
#object.save
In the view, you would have both options, perhaps side by side and you can let them post to different actions. So if a file is selected and posted you save it normally. If a url is entered, then you can check if it's a video site or not - if video, parse out the info using the video_info gem and store it. Otherwise just use the two lines above and save the url image.
Note
My answer doesn't discuss the quality / nature of user inputs. The likely-hood of someone entering an incorrect url is high in my opinion, so you want to wrap attempts to save the url as an image in a begin-rescue block and perhaps using JS limit the video domains to just a few websites which you will be able to parse.

rails 3: how to add (or perhaps substitute) a text string to an existing PDF document?

Users of our app need to print a PDF document we have pre-created, but have a placeholder string in the PDF template "YOUR_NAME_HERE" be replaced with their name. (Or, alternatively, we could no use a placeholder and add a new string with a certain font/style at a certain X,Y offset.)
Doing full PDF creation is overkill, since ALL we need to do is add their name to the PDF doc.
To make it more fun, we're hosted on Heroku which does not have local file storage, so we need to create the final PDF as something displayed in their browser that can (hopefully) be saved to local disk.
Does anyone know of a technique that would let us easily add (or replace) text to an existing PDF document?
I'm not finding anything for editing PDFs in ruby. I would just look into using something like prawn to generate them, even if that is a bit overkill when only a few words are different between each.
If efficiency is an issue, you could convert the pre-made part into a PNG and then just add the text on top. It feels dirty, but it'd probably be quicker than full generation and I don't know what other options you have, since it doesn't seem like anyone has implemented a true PDF editor in ruby yet.
As far as local storage, keep in mind that you do have write access to tmp/ on Heroku, so you can use that as long as you're only going to use the file during a single request.

Issues with Filemaker IWP working with hyperlinks on images

I have a filemaker database that I need to be able to link records and all associated data (including container field data) to various points placed on a large PDF image, and then make that data appear via instant web publishing when someone clicks on the marker for that area on the PDF. For example the PDF may be an image of a car, and then I would have various close up images of issues with the car and descriptions of those images as records in the database. I would then want to drop points on the base PDF image and when you clicked on those points be able to see the close up images and other data related to those images.
I'm being told this is too much for IWP because:
I need to place the markers outside filemaker via PDF annotation
Filemaker IWP can't handle the number of markers that may be necessary (it could be up to 1,000 on an E sized image.
Does anyone have a work around or explanation why this is a problem?
If I understand correctly, you would like to setup a PDF with links that will open a browser and show data related to what was clicked. Assuming that is the case, the reason this wont work is because IWP does not provide a unique URL for a unique page. For example, here on StackOverflow you can directly link to any question based on its URL:
http://stackoverflow.com/questions/3207775/ -- this question
http://stackoverflow.com/questions/4973921/ -- some other question
IWP uses Javascript and session variables to manipulate the output to the screen, so there is no way to link to a specific section of your IWP site, since the URL is always something like:
http://yoursite.com/fmi/iwp/cgi?-db=YOUR_DB-loadframes -- Product A
http://yoursite.com/fmi/iwp/cgi?-db=YOUR_DB-loadframes -- Product B
http://yoursite.com/fmi/iwp/cgi?-db=YOUR_DB-loadframes -- Product C
Because of the limited nature of IWP, you will not be able to workaround this issue. You'll need to build your own web-interface using the Custom Web Publishing Engine, either using the built-in PHP extensions or some other technology where you invoke the XML publishing API.
I agree with Nate
IWP is the wrong solution to this problem. You'd be better off simply hosting those images on a webserver.
Now here comes the plug, you can use SuperContainer to really simplify the management of the images from FileMaker.

Resources