Goto page 1, 2  Next

● About Tutorial Module

Wed May 20, 2015 7:54 am
NOOB!!!
28 Posts
Reputation: 196.5
Hello mate,

i was adjusting the Tutorial Module a bit fixing some bug, i noticed in the file:

how to switch text input area to ckeditor same as:

../admin.php?op=addtutorial

in the user submissions this is the link:

../modules.php?name=Tutorials&file=submit

cheers.
Thu May 21, 2015 1:44 am
Clan Leader
Top Dog
Nuke Dev / Coder
3040 Posts
coRpSE
Currently Offline
Offline

Most Played:
This week: 16.3hrs.
Total Played: 565hrs.


  
Must be married.
Reputation: 7377
votes: 7
Try this

Open: public_html/modules/Tutorials/submit.php

Find:

PHP:  [ Select all ]

    echo "</select><br \/><br \/>"
    
.""._TUTADMINDESCRIPTION255."<br \/><textarea name=\"description\" cols=\"60\" rows=\"5\"></textarea><br \/><br \/>";
 
       tutorial_form();
 
       echo "            <td colspan=\"9\"><span class=\"gen\">
              <textarea name=\"message\" rows=\"40\" cols=\"100%\" wrap=\"virtual\" class=\"post\" onselect=\"storeCaret(this);\" onclick=\"storeCaret(this);\" onkeyup=\"storeCaret(this);\"></textarea>
              </span></td>
          </tr>
        </table>
        </span></td>
    </tr>
  </table>"

 
Replace With:

PHP:  [ Select all ]

        echo "</select><br \/><br \/>";
 
   echo _TUTADMINDESCRIPTION255."<br \/><textarea name=\"description\" cols=\"60\" rows=\"5\"></textarea><br \/><br \/>";
 
   echo _TUTADMINTUTORIALTEXT.":<br \/>
         <font class=\"tiny\">"
._TUTADMINPAGEBREAK."</font><br \/>";
 
       echo "<span class=\"gen\">";
 
       echo Make_TextArea('message''''message''80%''230px'false);
 
       echo "</span><br/>";
//    echo "</select><br \/><br \/>"
//    .""._TUTADMINDESCRIPTION255."<br \/><textarea name=\"description\" cols=\"60\" rows=\"5\"></textarea><br \/><br \/>";
//        tutorial_form();
//        echo "            <td colspan=\"9\"><span class=\"gen\">
//              <textarea name=\"message\" rows=\"40\" cols=\"100%\" wrap=\"virtual\" class=\"post\" onselect=\"storeCaret(this);\" onclick=\"storeCaret(this);\" onkeyup=\"storeCaret(this);\"></textarea>
//              </span></td>
//          </tr>
//        </table>
//        </span></td>
//    </tr>
//  </table>"; 

 
Save & Close

As you can see, I did not remove the old code, I just canceled it out with a // and built in a new section. I did a quick test on my site and seemed to post okay, but I did not go crazy on the testing, barely at all. but I believe it should work.


Expand
Thu May 21, 2015 4:53 am
Original Poster
NOOB!!!
28 Posts
Reputation: 196.5
oh gr8! thank no problem i will test it and i will be back here. :)

PS/ i noticed another stuff need to be fixed, i can post here or i have to open another topic?


 
Thu May 21, 2015 5:03 am
Original Poster
NOOB!!!
28 Posts
Reputation: 196.5
nope it's not correct, something wrong with table, i'm trying to fix it.


 
Thu May 21, 2015 7:09 pm
Clan Leader
Top Dog
Nuke Dev / Coder
3040 Posts
coRpSE
Currently Offline
Offline

Most Played:
This week: 16.3hrs.
Total Played: 565hrs.


  
Must be married.
Reputation: 7377
votes: 7
Try it now. I just tried it on mine and I found there was an error. I just updated the code in the first post I did.


 
Fri May 22, 2015 1:38 am
Original Poster
NOOB!!!
28 Posts
Reputation: 196.5
Hello mate, nope white page now.

found out is missing a: ;
here:
echo "</span><br>"

should be:

echo "</span><br>";


--edited--

it should be added also at Waiting Submissions area when you have to approve or deny it.

admin.php?op=subedit&subid=X


 
Fri May 22, 2015 3:10 am
Clan Leader
Top Dog
Nuke Dev / Coder
3040 Posts
coRpSE
Currently Offline
Offline

Most Played:
This week: 16.3hrs.
Total Played: 565hrs.


  
Must be married.
Reputation: 7377
votes: 7
Yeah, on my version, I did not need the ; at the end. Might of been something I re-coded in the past. I fixed my previous post so if others do this, it will not affect them.


 
Fri May 22, 2015 5:10 am
Original Poster
NOOB!!!
28 Posts
Reputation: 196.5
ok good mate! and what about the subadd operation?


 
Fri May 22, 2015 8:12 pm
Clan Leader
Top Dog
Nuke Dev / Coder
3040 Posts
coRpSE
Currently Offline
Offline

Most Played:
This week: 16.3hrs.
Total Played: 565hrs.


  
Must be married.
Reputation: 7377
votes: 7
I will take a look at it later. The technique will be the same as I did before more and likely.


 
Tue May 26, 2015 6:54 pm
Clan Leader
Top Dog
Nuke Dev / Coder
3040 Posts
coRpSE
Currently Offline
Offline

Most Played:
This week: 16.3hrs.
Total Played: 565hrs.


  
Must be married.
Reputation: 7377
votes: 7
Okay, this one is easier.

Open: public_html/modules/Tutorials/admin/index.php

Find:

PHP:  [ Select all ]

        tutorial_form();
        echo 
"<td colspan=\"9\"><span class=\"gen\"><textarea name=\"message\" rows=\"40\" cols=\"100%\" wrap=\"virtual\" class=\"post\" onselect=\"storeCaret(this);\" onclick=\"storeCaret(this);\" onkeyup=\"storeCaret(this);\">$t_text</textarea></span></td></tr></table></span></td></tr></table>"

 
Should be on line 1492 and 1493.

Replace with:

PHP:  [ Select all ]

        echo Make_TextArea('message'$t_text'post''100%''300px'true);
        echo 
"<br \/>";
//        tutorial_form();
//        echo "<td colspan=\"9\"><span class=\"gen\"><textarea name=\"message\" rows=\"40\" cols=\"100%\" wrap=\"virtual\" class=\"post\" onselect=\"storeCaret(this);\" onclick=\"storeCaret(this);\" onkeyup=\"storeCaret(this);\">$t_text</textarea></span></td></tr></table></span></td></tr></table>"; 

Again, as you can see, I didn't remove the old code, I just canceled it out using a // infront of it. That should be it.


 
Goto page 1, 2  Next
Forums ©