Welcome, Guest. Please Login or Register.
May 10, 2025, 03:48:24 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  new action « previous next »
Pages: [1] Reply Ignore Print
Author Topic: new action  (Read 729 times)
raffael3d
Jr. Member
**
Posts: 79


I'm a llama!

new action
« on: March 16, 2003, 12:03:21 AM »
Reply with quote

I want to determine a new action in the code, what is needed for that? seems not to be working

In Subs.php I added a new link and in "profile" I defined a new function with that name...but nothing happens, any tips? thanks.
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:new action
« Reply #1 on: March 16, 2003, 12:10:15 AM »
Reply with quote

add into the index.php array
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
raffael3d
Jr. Member
**
Posts: 79


I'm a llama!

Re:new action
« Reply #2 on: March 16, 2003, 12:24:28 AM »
Reply with quote

thanks.

I want to make a control panel in the "profile.php" file

what I did:

- I added 'ControlPanel' => array("$sourcedir/profile.php", 'ControlPanel'), to the index.php array.
- I added in Subs.php to the menu a $yymenu .= "$menusep<a href=\"$cgi;action=shownotify\">$img[notification]</a>";
- in Profile.php I added
function ControlPanel () {
print "test.php";
}

it's not working (I'm not yet very familiar with actions) any help appreciated.
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:new action
« Reply #3 on: March 16, 2003, 12:27:33 AM »
Reply with quote

php is case-sensitive, Profile.php and profile.php are different (except if u're on windows server)
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
raffael3d
Jr. Member
**
Posts: 79


I'm a llama!

Re:new action
« Reply #4 on: March 16, 2003, 12:35:49 AM »
Reply with quote

thanks . tried that, but didn't change anything. if I click on the link nothing happens, I end up on the forum index.
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:new action
« Reply #5 on: March 16, 2003, 12:39:52 AM »
Reply with quote

can u post the forum url?
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
raffael3d
Jr. Member
**
Posts: 79


I'm a llama!

Re:new action
« Reply #6 on: March 16, 2003, 12:46:14 AM »
Reply with quote

www.xsibase.com/forum/index.php
you have to register. then you have two "profile" buttons
the right one is the one I try to program.

the board is still only for testing the real forum is yet a yabbgold, but that will change as soon as SE is ready.
Logged
raffael3d
Jr. Member
**
Posts: 79


I'm a llama!

Re:new action
« Reply #7 on: March 16, 2003, 01:03:54 AM »
Reply with quote

any idea?
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:new action
« Reply #8 on: March 16, 2003, 01:03:58 AM »
Reply with quote

hmm can u copy and paste the current line in index.php that u added? also a line before that could be helpful
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
raffael3d
Jr. Member
**
Posts: 79


I'm a llama!

Re:new action
« Reply #9 on: March 16, 2003, 01:07:24 AM »
Reply with quote

   'clean_log' => array("$sourcedir/Admin.php", 'clean_log'),
      'ControlPanel' => array("$sourcedir/Profile.php", 'ControlPanel'),
Logged
raffael3d
Jr. Member
**
Posts: 79


I'm a llama!

Re:new action
« Reply #10 on: March 16, 2003, 01:25:32 AM »
Reply with quote

what about havig to add $_GET['action']  ?
Logged
[Unknown]
Global Moderator
YaBB God
*****
Posts: 7830


ICQ - 179721867unknownbrackets@hotmail.com WWW
Re:new action
« Reply #11 on: March 16, 2003, 01:56:17 AM »
Reply with quote

Quote from: raffael3d on March 16, 2003, 01:07:24 AM
   'clean_log' => array("$sourcedir/Admin.php", 'clean_log'),
      'ControlPanel' => array("$sourcedir/Profile.php", 'ControlPanel'),

I reccomend you do it in lowercase... ie. action=controlpanel

And, I would do it as so:
     'controlpanel' => array("$sourcedir/Profile.php", 'ControlPanel'),

This might be the problem, although I'm not sure.

No, you don't need to use $_GET['action']...

Does ControlPanel have an obExit(); at the end?  It should.

-[Unknown]
Logged
raffael3d
Jr. Member
**
Posts: 79


I'm a llama!

Re:new action
« Reply #12 on: March 16, 2003, 02:05:35 AM »
Reply with quote

didn't help.

here is what I have so far:
Profile.php
function controlpanel ()
{
   
   echo '
         <table border="0" width="100%" cellspacing="1" bgcolor="' . $color['bordercolor'] . '">
            <tr>
               <td align=left bgcolor="' . $color['titlebg'] . '" class="titlebg">
                  <font class="text1" color="' . $color['titletext'] . '" size="2">&nbsp;' . $counter . '&nbsp;</font>
               </td>
            </tr>
            <tr>
               <td>test</td>
            </tr>
         </table>';
obExit();
}


Subs.php
$yymenu .= "$menusep<a href=\"$cgi;action=controlpanel;user=$euser\">$img[profile]</a>";

index.php
'controlpanel' => array("$sourcedir/Profile.php", 'controlpanel'),


any help appreciated.
Logged
Spaceman-Spiff
Mod Team
YaBB God
*****
Posts: 3689


My $txt[228]

Re:new action
« Reply #13 on: March 16, 2003, 02:32:52 AM »
Reply with quote

put this at the beginning of controlpanel():
   template_header();

and at the end:
   footer();
   obExit();
Logged

   My mods, ysePak, codes, tutorials
    Support question IMs = bad.
raffael3d
Jr. Member
**
Posts: 79


I'm a llama!

Re:new action
« Reply #14 on: March 16, 2003, 02:39:29 AM »
Reply with quote

thanks...still no change...

now my code in profile.ph looks like this:

function controlpanel ()
{
template_header();
   echo '
         <table border="0" width="100%" cellspacing="1" bgcolor="' . $color['bordercolor'] . '">
            <tr>
               <td align=left bgcolor="' . $color['titlebg'] . '" class="titlebg">
                  <font class="text1" color="' . $color['titletext'] . '" size="2">&nbsp;' . $counter . '&nbsp;</font>
               </td>
            </tr>
            <tr>
               <td>test</td>
            </tr>
         </table>';
footer();
obExit();
}
Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  Development  |  Mod Ideas and Creation  |  new action « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.095 seconds with 21 queries.