Search found 19 matches
- Wed Mar 19, 2008 11:03 pm
- Forum: Joombie Coding Q/A
- Topic: how does JTable's store() works?
- Replies: 6
- Views: 1026
Re: how does JTable's store() works?
I assumed there is always an ID being passed along, if not then you insert new data rather then update the current. The id can be placed in the hidden input field like a few posts up. Usually when binding does not work for me, it's because I have mistyped the name of a database field in the table cl...
- Sun Mar 16, 2008 3:45 am
- Forum: Joombie Coding Q/A
- Topic: how does JTable's store() works?
- Replies: 6
- Views: 1026
Re: how does JTable's store() works?
Well Store is a nice and easy way to bind data to a table, but you don't have to use it, you can use your own sql inserts. Where you have your store function I believe you can get all the posted variables by using JRequest::getVar maybe something like: $db = & JFactory::getDBO(); $title = JReque...
- Sat Mar 15, 2008 1:48 am
- Forum: Joombie Coding Q/A
- Topic: Edit "Filter" / "Display #" to Search / Amount etc.
- Replies: 1
- Views: 269
Re: Edit "Filter" / "Display #" to Search / Amount etc.
administrator > components > com_categories > admin.categories.html.php
Around line 45 you will see <?php echo JText::_( 'Filter' ); ?>:
Around line 45 you will see <?php echo JText::_( 'Filter' ); ?>:
- Thu Mar 13, 2008 12:16 am
- Forum: Joombie Coding Q/A
- Topic: how does JTable's store() works?
- Replies: 6
- Views: 1026
Re: how does JTable's store() works?
<input class="inputbox" type="text" name="title" size="40" maxlength="255" value="<?php echo $this->row->title; ?>" /> name="title" in the input field <-- binds to a database field named "title" Yes saving decides withe...
- Wed Mar 12, 2008 2:38 am
- Forum: Joombie Coding Q/A
- Topic: Help with some code needed!
- Replies: 2
- Views: 316
Re: Help with some code needed!
The ? is like an "if statement"
is the same as
Code: Select all
(substr($row->homepage, 0, 4) != 'http' ? 'http://' . $row->homepage : $row->homepage)
Code: Select all
if(substr($row->homepage, 0, 4) != 'http')
{
'http://' . $row->homepage;
}
else
{
$row->homepage;
}
- Tue Mar 11, 2008 11:13 am
- Forum: Joombie Coding Q/A
- Topic: Populating a list like JHTML::_('list.category' ...
- Replies: 8
- Views: 4953
Re: Populating a list like JHTML::_('list.category' ...
If your after a calendar, you can just use <?php echo JHTML::_('calendar', $this->row->created, 'created', 'created', '%Y-%m-%d %H:%M:%S', array('class'=>'inputbox', 'size'=>'25', 'maxlength'=>'19')); ?> this will echo out a input filed and the DHTML date selector. If you prefer to merge post data f...
- Tue Mar 11, 2008 9:48 am
- Forum: Joombie Coding Q/A
- Topic: Reading jos_users
- Replies: 2
- Views: 320
Re: Reading jos_users
If you have phpMyAdmin on the server, it allows you to export tables to a heap of different formats like CSV, Excel etc...
If you do have it, you will be able to find guides on how to export data
If you do have it, you will be able to find guides on how to export data
- Sat Mar 08, 2008 5:26 pm
- Forum: Joombie Coding Q/A
- Topic: Dynamic Values in <Params> in component.xml [J1.0]
- Replies: 3
- Views: 501
Re: Dynamic Values in <Params> in component.xml [J1.0]
I believe if your setting you params in the component .xml then their generally preset unless its a core list like Joomla's categories. You can create custom radio options, or drop downs from within your component by using the mosHTML class for Joomla 1.0.x. You can find a list of it's functions and...
- Sat Mar 08, 2008 2:44 am
- Forum: Joombie Coding Q/A
- Topic: My First AJAX Module [Joomla 1.5]
- Replies: 1
- Views: 364
- Sat Mar 08, 2008 2:11 am
- Forum: Joombie Coding Q/A
- Topic: Dynamic Values in <Params> in component.xml [J1.0]
- Replies: 3
- Views: 501
Re: Dynamic Values in <Params> in component.xml [J1.0]
You could create the options in your view like this based on the database call to pull the required items.
- Sat Mar 08, 2008 2:05 am
- Forum: Joombie Coding Q/A
- Topic: advanced search functionality
- Replies: 1
- Views: 266
Re: advanced search functionality
Well something like that is way off from what Joomla does by default. From my thinking you would first write a component to store and display this data. Then you would need to write a custom search mambot (plugin) for that component. I think it would be much more difficult to hack Joomla to do somet...
- Sat Mar 08, 2008 1:59 am
- Forum: Joombie Coding Q/A
- Topic: Populating a list like JHTML::_('list.category' ...
- Replies: 8
- Views: 4953
Re: Populating a list like JHTML::_('list.category' ...
The code uses " $db->setQuery($sql);"
so you will need to include $db =& JFactory::getDBO();
before the posted code.
so you will need to include $db =& JFactory::getDBO();
before the posted code.
- Sat Mar 08, 2008 1:56 am
- Forum: Joombie Coding Q/A
- Topic: Published/Unpublished content
- Replies: 1
- Views: 254
Re: Published/Unpublished content
It's the "state" field in the "jos_content table"
- Wed Mar 05, 2008 9:03 am
- Forum: Joombie Coding Q/A
- Topic: Populating a list like JHTML::_('list.category' ...
- Replies: 8
- Views: 4953
Re: Populating a list like JHTML::_('list.category' ...
In my viewhtml.php I built the list like this: // build the catagory list $sql = 'SELECT id, cattitle' . ' FROM #__whosracing_cat' ; $db->setQuery($sql); $catlist[] = JHTML::_('select.option', '0', JText::_( '- Select Category -' ), 'id', 'cattitle' ); $catlist = array_merge( $catlist, $db->loadObje...
- Wed Mar 05, 2008 8:49 am
- Forum: Joombie Coding Q/A
- Topic: Making objectHTMLSafe work
- Replies: 5
- Views: 569
Re: Making objectHTMLSafe work
Just before you store your data, intercept the text area content like so: $data = JRequest::get( 'post' ); $data['ingredients'] = JRequest::getVar( 'ingredients, '', 'post', 'string', JREQUEST_ALLOWRAW ); // Bind the form fields to the table if (!$row->bind($data)) { $this->setError($this->_db->getE...
- Sun Mar 02, 2008 2:24 am
- Forum: Joombie Coding Q/A
- Topic: Populating a list like JHTML::_('list.category' ...
- Replies: 8
- Views: 4953
Re: Populating a list like JHTML::_('list.category' ...
OK, I got it by placing this in my view.html $sql = 'SELECT id, cattitle' . ' FROM #__customcategories' ; $db->setQuery($sql); $catlist[] = JHTML::_('select.option', '0', JText::_( '- Select Category -' ), 'id', 'cattitle' ); $catlist = array_merge( $catlist, $db->loadObjectList() ); $lists['catid']...
- Sat Mar 01, 2008 1:34 pm
- Forum: Joombie Coding Q/A
- Topic: component-title next to toolbar like 'Category Manager'
- Replies: 4
- Views: 526
Re: component-title next to toolbar like 'Category Manager'
With 1.0.x it was just placed in the .html.php output file like: <table class="adminheading"> <tr> <th> Weblink: <small> <?php echo $row->id ? 'Edit' : 'New';?> </small> </th> </tr> </table> I find that browsing the source files of the "Weblinks" or "Banners" components...
- Sat Mar 01, 2008 9:40 am
- Forum: Joombie Coding Q/A
- Topic: component-title next to toolbar like 'Category Manager'
- Replies: 4
- Views: 526
Re: component-title next to toolbar like 'Category Manager'
Put this in your view.html.php file
Code: Select all
JToolBarHelper::title( JText::_( 'My Component Title' ), 'generic.png' );
- Fri Feb 29, 2008 7:50 am
- Forum: Joombie Coding Q/A
- Topic: Populating a list like JHTML::_('list.category' ...
- Replies: 8
- Views: 4953
Populating a list like JHTML::_('list.category' ...
Hey Guys and Gals, I have my own Categories table in the database that I need to display in the drop down list. Could someone please give me a hand with this. I found this in the weblinks component: $lists['catid'] = JHTML::_('list.category', 'filter_catid', $option, intval( $filter_catid ), $javasc...