Joomla - create articles from a query on database - joomla

I am quite new at Joomla. I am trying to create articles dynamically from a table in the database. For instance, let's imagine I have a table that will point to text,image,..., I would like the content to display all (actually, with a modifiable query) articles to feed the display.
Do you know if there is an extension that would allow me similar things, or is there already something built-in?
Thanks for the help !

Related

Extend an user definded table in SAP

I am trying to change a selection table within our packing list menu in our SAP system, but I do not know how to do this. My colleague, who is out indefinitely, has created a table of packing materials for our warehouse staff. This table is now to be extended by two further entries. The selection table is in the packing list table DLN7. I have also shown this in the picture attached.
So far I have checked all custom tables and custom windows. However, the table displayed is not there. Does anyone know where in SAP I have to look?
I would be very happy to receive further hints on this.
Thank you very much in advance.

Store translated versions in database for Joomla component

I'm currently developing my first MVC component for Joomla 3.x. All in all I'm bit struggling with language/translation issues in database.
My problem is that I need to store translated content of user generated content which comes from the backend. For example someone enters a new item in German (stored in database) and needs a translation in another language. How to accomplish that in Joomla? I don't like to generate a new item for every different language when the rest is all the same.
I thought about a table "item" and a table "item_language" with that structure (strongly simplified for viewing purposes):
item
id PRIMARY INT
price DOUBLE(4,2)
item_language
itemid PRIMARY INT
language PRIMARY CHAR(5)
name VARCHAR(50)
In item_language I would like to store the different translated versions. In the language field there would be the region code (eg. de-DE) to identify the language.
My problems:
How to display the different (translated) versions in backend?
Is this the right database model?
Any help is appreciated!
You have really found yourself a nice task for a first component in Joomla!
A rather generalist answer:
The database model seems right. Alternatively you could encode in JSON the language data, but this could make later query operations potentially difficult. This way you will only have one table to work with.
As far as I know (if you are using JModel / JTable to manipulate the data) can't do this directly, as JTable is really only designed to manipulate single tables.
What you can do:
For editing: figure a way to represent this graphically ( for your users to see and edit this one to many relationship) and to post this data (language texts as an array) to JModel. In the model you can maintain the desired relationships and save the data using JTable.
Viewing (without editing) shouldn't be an issue, it would be a simple JOIN.
If you are willing to create a basic component on github, I might even give you a hand with JModel / JTable.
I found a way to deal with the things I needed.
Thanks Valentin Despa for guiding me in the right direction :-).
Here the whole procedure (simplified - validations and exact steps omitted):
Define the form fields in the models/forms/site.xml as normal.
In views/site/tmpl/edit.php add self coded Javascript (based on jQuery) to deal with the fields which have content in multiple languages stored as JSON in database.
Clone the original form element and modify the needed attributes (id, name, ...) to display a special version just for the defined languages. As content - extract the JSON for the needed language from original field content and display.
Hide the original field with Javascript and append the customized versions to DOM.
Afterwards in tables/site.php I read the dynamically generated content withJInput and build together the original field by generating JSON and saving to database.
It's working like expected.

Joomla 'sobipro' - extracting data

I have taken over a Joomla project that needs rebuilding.
I need to get out the user data and some other data linked to users, I have found most of it in the jos_user table and also a table named jos_comprofiler.
There is data inside of jos_sobipro_field_data that I also need, but I do not know how this table related to anything else can someone please explain? I am able to write SQL and the JOIN statements to get it out once I understand how it all fits together.
Finally the table jos_comprofiler references an avatar which is an image name like '100_4f97c0b3c2c31.jpg' where can I find these images?
Thanks, Jake
I can tell you where those tables are coming from:
- jos_users is the user table used by Joomla core, together with jos_user_profiles for additional profile information.
- jos_comprofiler is a table created by the Community Builder extension from http://www.joomlapolis.com/.
- jos_sobipro_field_data is a table created by SobiPro from http://sobipro.sigsiu.net/
Maybe that helps you find the next steps. Maybe someone else knows more details.

How can i insert a new article into joomla 2.5 database directly?

I am using Joomla 2.5 and want to insert 100 articles without using Joomla's article manager.
How can I achieve this?
This is incomplete. You also would need to add records to the assets table and to make sure that they are properly keyed to the content table and nesting within a category asset as well as the com_content asset. You can put all of the articles in the uncategorised category to handle that however.
Well, if I wanted to add 100 articles as quickly as possible, I would take a backup of the #__content table in the database, open it in Notepad++, add all my articles in and re-upload the table.
If you do this, don't forget to assign each article a different ID.

Retrieving articles based on custom URL parameters

I'm a beginner using Joomla 1.5. I have a page which shows articles in a blog format. My objective is to show/filter the articles per year (which isn't that many) based on user input. I'm planning to create a module on the right side, showing a dropdown box of the years, and retrieve the results by passing the year parameter as part of the URL
Ex.
http://sample.com/index.php?option=com_content&view=category&layout=blog&id=39&Itemid=24&year=2011
What is the best, simplest way of passing and processing additional parameters to com_content via URL? Can I do so using extensions such as K2 and flexicontent? If not, can someone advise me what code to add and where, in com_content? If I have to extend com_content itself, can someone guide me how to or point some useful articles?
Appreciate the help. Thanks
I don't know if K2 or flexicontent offer this option, but com_content appears NOT to have this feature.
I would just build a module, create a query and use the table jos_content, select only the fields that you need (like title) and check the field created to be in the year you need.

Resources