Może ktoś wie gdzie w dj classifieds w jakim pliku można trochę rozbudować formularz, a dokładniej chcę dodać kilka pól do wypełniania takich jak np telefon czy miasto itp. Wiem że te informacje można podać w tych polach co są ale chodzi o to ze jak nie będzie tych pól to sprzedający nie wpisze mi tych informacji a to bardzo ważne :).
agnieszkaaga
12-12-2010, 15:03
<a href="http://www.edugames.pl" target="_blank">Gry Edukacyjne Edugames</a>
Gry Edukacyjne Edugames (http://www.edugames.pl)
krzy5iek
14-12-2010, 22:30
No dobra, znalazłem jak dodać pole w formularzu, jak wyświetlić nazwę pola w ogłoszeniu, ale nie dam rady wyświetlić zawartości tego dodanego pola w ogłoszeniu :) może ktoś wie gdzie dopisać jedną linijkę kodu :P albo dwie.
to jest chyba w pliku com_djclassifieds/views/showitem/tmpl/defalut.php
a dokładnie w miejscu:
description1 to moje nowe pole formularzu, w tej postaci description1 wyświetla zawartość description, gdy zmienie $i->description.'</div>'; na $i->description1.'</div>'; nie wyświetla mi zawartości mojego nowego pola. Nie mam nic pojęcia o PHP i wszystko robie metoda prób i błędów :) Wiec proszę o małą wskazówkę a resztę poradzę sam.
artur301pl
09-04-2011, 22:28
Niestety po angielsku ale podobno działa :)
Adding Fields to djClassifieds
Before I even start, please note that this tutorial is based on the advice of 'dontysk' in previous replies, who deserves all credit.
OK, Let's say we want to add a telephone number field called 'phone' to our ad.
We need to make changes in the database, backend and frontend.
Step 1 – Database
Look for a table called "jos_djcf_items" in your database, I use phpMyAdmin for that matter. In "structure", you will get the entire set of fields where
you can add 'phone'. Make sure you define it properly in terms of encoding, type etc.
Step 2 – Backend
Step 2.1 – tables folder
go to /public_html/administrator/components/com_djclassifieds/tables/items.php
Right below line 45 - var $intro_desc = null; add the following:
var $phone = null;
Step 2.2 – views folder
Go to /public_html/administrator/components/com_djclassifieds/views/edititem/tmpl/ default.php
Right below line 120, after "intro_desc" part, add the following:
Backend - /public_html/administrator/language/en-GB/en-GB.com_djclassifieds.ini
Fronend - /public_html/language/en-GB/en-GB.com_djclassifieds.ini
* Don't forget to save in UTF-8
Add it to any relevant language ini file, preferably after the "short description" tags:
SHORT_DESCRIPTION=Description
PHONE=phone
Thats it !
Enjoy,
Yariv
Na pewno działa, dzisiaj sprawdziłem :p dodałem pole telefon i miasto.