Has anyone used Joomla before? I have setup a basic Joomla installation for my office to use as a support site... and am trying to create a custom component to read/store change control information. I sucked the change controls into the MySQL database and I can read from it successfully. I can write to the database using a form I created, but the "New" button doesn't work...... If anyone has had experience here, some help would be appreciated
Announcement
Collapse
No announcement yet.
Anyone Use Joomla? I could use some help...
Collapse
X
-
Originally posted by Savage_Hobo View PostHas anyone used Joomla before? I have setup a basic Joomla installation for my office to use as a support site... and am trying to create a custom component to read/store change control information. I sucked the change controls into the MySQL database and I can read from it successfully. I can write to the database using a form I created, but the "New" button doesn't work...... If anyone has had experience here, some help would be appreciated
I've used CMS's before. The new button being like a new post? What is the raw html code look like.
View/Page Source in firefox
-
Here is my admin.change_control.html.php (the top bit of it... below is my form)
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
class HTML_contact
{
function addChangeControl($lists){
JRequest::setVar( 'hideMainMenu', 1 );
$editor =& JFactory::getEditor();
?>
<script language="javascript" type="text/javascript">
<!--
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
submitform( pressbutton );
}
//-->
</script>
<form action="index.php" method="post" name="adminForm">
<table class="admintable">
.......------->>>>> FORM STUFF <<<<<<<<------........
</table>
<input type="hidden" name="option" value="com_change_control" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="hidemainmenu" value="1" />
</form>
<?php
Here is the toolbar.change_control.html.php file....
<?php
defined( '_JEXEC' ) or die( 'Restricted access' );
class TOOLBAR_change_control {
function _NEW() {
JToolBarHelper::title( JText::_( 'Add Change Control Entry' ), 'generic.png' );
JToolBarHelper::save();
JToolBarHelper::apply();
JToolBarHelper::cancel();
}
function _DEFAULT() {
JToolBarHelper::title( JText::_( 'Change Control Manager' ), 'generic.png' );
JToolBarHelper:ublishList();
JToolBarHelper::unpublishList();
JToolBarHelper::deleteList();
JToolBarHelper::editListX();
JToolBarHelper::addNewX();
}
}
?>
Then here is the switch in my admin.change_control.php file......
$task = JRequest::getCmd('task');
// checks the $task variable and
// choose an appropiate function
switch($task){
case 'add':
addChangeControl();
break;
which calls this section...................
function addChangeControl(){
$lists['published'] = JHTML::_('select.booleanlist', 'published' , 'class="inputbox"', $row->published);
// display function
HTML_contact::addChangeControl($lists);
}
And the HTML_contact calls the stuff in at the top of my post (you can see the function).
lol... apparently a few of the ": p's" got turned into faces !
Comment
-
To be honest I'm not much for debugging php. One thing that pops to mind is does your web server support post. Some do not unless configured to do so. Also check your user rights. I don't know what web server your using but, if it's apache you might want to check error_log and access_log files.
Sorry not much help...
Yeah the :P thing made me laugh
Comment
-
Thanks, I'll check the logs tonight, right now it's running on my Laptop and it does support posts. I can successfully write information into the database via thr form... but to get to it I have to tack on ?task=add to the end of the address. The "new" button should just take me to that page... when you click New it's supposed to set the $task variable to 'add' but I get a weird document.adminForm has no properties (javascript error) error.....
Comment
Cain's Lair Forums Statistics
Collapse
Topics: 26,187
Posts: 269,851
Members: 6,183
Active Members: 4
Welcome to our newest member, Fermin13Q.
Today's Birthdays
Collapse
There are no members with birthdays today.
Top Active Users
Collapse
There are no top active users.
More Posts
Collapse
-
Reply to Hi guys!by glasscasketArma Reforger off and on. Some Hell Let Loose. Been hopping around VR titles.
Hope all is well with y'all30 Nov 2024, 11:06 AM
Comment