Announcement

Collapse
No announcement yet.

Anyone Use Joomla? I could use some help...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Anyone Use Joomla? I could use some help...

    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

    #2
    Originally posted by Savage_Hobo View Post
    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

    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

    Comment


      #3
      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


        #4
        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


          #5
          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,850   Members: 6,183   Active Members: 6
          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 Evil_T0NY {CLR}
            I've been Alpha and will be Beta testing the Delta Force game. It's been really getting good reviews! Definitely a good Battlefield feel to it like the...
            14 Nov 2024, 08:50 PM
          • Reply to Hope your all OK over there
            by Apache Warrior
            We had 17 inches of rain from the storm on November 7, 2024.
            Apache
            11 Nov 2024, 07:55 AM
          • Reply to Hope your all OK over there
            by Sirex
            Aye, I'm inclined to agree with that lmao
            Gone are the days of warm summers and snow filled winters here, nothing but rain and wind for 8mths of...
            10 Nov 2024, 08:53 PM
          • Reply to Hope your all OK over there
            by Apache Warrior
            Now we have had a lot of flooding in this area and there are still a lot of houses that have not been repaired. Must be the apocalypse.
            ...
            8 Nov 2024, 09:23 AM
          Working...
          X