YaBB SE Community

Development => Completed mods => Topic started by: Scorpion on August 24, 2003, 03:17:35 PM

Title: [Done 1.5.4] Quick Admin
Post by: Scorpion on August 24, 2003, 03:17:35 PM
The code from this mod was takin from yapp, I only made a few changes for the delete function to work.

Download board mod file here (http://www.shadow-clanz.com/mods/Quick%20Admin.zip)

Edit File: MessageIndex.php

Find:
Code: [Select]
global $curposlinks, $cgi, $yytitle, $settings, $start, $modSettings, $viewResults, $ID_MEMBER, $db_prefix;
Replace With:
Code: [Select]
global $curposlinks, $cgi, $yytitle, $settings, $start, $modSettings, $viewResults, $ID_MEMBER, $db_prefix, $qatxt, $qaimg, $sc;

echo '

<script language="JavaScript1.2" type="text/javascript">
function DoConfirm(message, url)
{
if (confirm(message))
location.href = url;
}
</script>';

Find:
Code: [Select]
<td class="titlebg" bgcolor="' . $color['titlebg'] . '" width="27%">
<font size="2" class="text1" color="' . $color['titletext'] . '"><b>' . $txt[111] . '</b></font>
</td>
</tr>';

Replace With:
Code: [Select]
<td class="titlebg" bgcolor="' . $color['titlebg'] . '" width="27%">
<font size="2" class="text1" color="' . $color['titletext'] . '"><b>' . $txt[111] . '</b></font>
</td>';
if (($settings[7] == "Administrator") || ($settings[7] == "Global Moderator")) {
print "<td class=\"titlebg\" bgcolor=\"$color[titlebg]\"><font size=\"2\" class=\"text1\" color=\"$color[titletext]\"><b>$qatxt[1]</b></font></td>";
}
print <<<EOT
</tr>
EOT;

Find:
Code: [Select]
<td class="windowbg2" valign="middle" width="27%" bgcolor="' . $color['windowbg2'] . '">
<font size="1">' . $mydate . '<br />' . $txt[525] . ' ' . $lastposter . '</font></td>
</tr>';
}
}

Replace With:
Code: [Select]
<td class="windowbg2" valign="middle" width="27%" bgcolor="' . $color['windowbg2'] . '">
<font size="1">' . $mydate . '<br />' . $txt[525] . ' ' . $lastposter . '</font></td>';
if (($settings[7] == "Administrator") || ($settings[7] == "Global Moderator")) {
print "<td class=\"windowbg\" valign=\"middle\" bgcolor=\"$color[windowbg2]\"><a href=\"$cgi;action=sticky;threadid=$mnum;sticky=$isSticky;q=1\">$qaimg[1]</a> <a href=\"$cgi;action=lock;threadid=$mnum;q=1\">$qaimg[2]</a> <a href=\"$cgi;action=movethread;threadid=$mnum;q=1\">$qaimg[3]</a> <a href=\"javascript:DoConfirm('$txt[162]','$cgi;action=removethread2;threadid=$mnum;sesc=$sc');\">$qaimg[4]</a></td>";
}
print <<<EOT
</tr>
EOT;
}
}

Edit File: English.lng

Find:
Code: [Select]
$txt[1005] = 'Close window';
Add After:
Code: [Select]
$qaimg[1] = "<img src=\"$imagesdir/sticky.gif\" border=\"0\" alt=\"Sticky this topic\">";
$qaimg[2] = "<img src=\"$imagesdir/locked.gif\" border=\"0\" alt=\"Lock/unlock this topic\">";
$qaimg[3] = "<img src=\"$imagesdir/moved.gif\" border=\"0\" alt=\"Move this topic\">";
$qaimg[4] = "<img src=\"$imagesdir/rem.gif\" border=\"0\" alt=\"Remove this topic\">";
$qatxt[1] = "Admin";

You will need this image (save it to your YaBBImages folder):

(http://www.shadow-clanz.com/forums/YaBBImages/rem.gif)

Picture of mod 'in action':

(http://www.shadow-clanz.com/forums/YaBBImages/test.gif)
Title: Re:[Done 1.5.4] Quick Admin
Post by: 1979Z28 on August 24, 2003, 03:56:21 PM
Looks good! ;D I was contemplating updating this to 1.5.4 myself, but I never had the time. I'll test it out in a little bit and see how it works.

You might wanna consider making this a .mod file and including the image in a .zip file :D Would make it a little easier to use. It's not that hard. If you want, I can create it for you
Title: Re:[Done 1.5.4] Quick Admin
Post by: Scorpion on August 24, 2003, 04:00:46 PM
I know how, I'm just lazy. I'll do it soon.
Title: Re:[Done 1.5.4] Quick Admin
Post by: 1979Z28 on August 24, 2003, 04:03:48 PM
Lazy? That sounds oddly famaliar..  :P
Title: Re:[Done 1.5.4] Quick Admin
Post by: 1979Z28 on August 24, 2003, 04:10:46 PM
Quote

Find:
Code: [Select]
<td class="windowbg2" valign="middle" width="27%" bgcolor="' . $color['windowbg2'] . '">
<font size="1">' . $mydate . '<br />' . $txt[525] . ' ' . $lastposter . '</font></td>
</tr>';
}
}

Replace With:
Code: [Select]
<td class="windowbg2" valign="middle" width="27%" bgcolor="' . $color['windowbg2'] . '">
<font size="1">' . $mydate . '<br />' . $txt[525] . ' ' . $lastposter . '</font></td>';
if (($settings[7] == "Administrator") || ($settings[7] == "Global Moderator")) {
print "<td class=\"windowbg\" valign=\"middle\" bgcolor=\"$color[windowbg2]\"><a href=\"$cgi;action=sticky;threadid=$mnum;sticky=$isSticky;q=1\">$qaimg[1]</a> <a href=\"$cgi;action=lock;threadid=$mnum;q=1\">$qaimg[2]</a> <a href=\"$cgi;action=movethread;threadid=$mnum;q=1\">$qaimg[3]</a> <a href=\"javascript:DoConfirm('$txt[162]','$cgi;action=removethread2;threadid=$mnum;sesc=$sc');\">$qaimg[4]</a></td>";
}
print <<<EOT
</tr>
EOT;
}
}

echo '
Just an FYI, with that echo ' on the end, it's not necessary, I believe. There's two echo '  's right next to each other. Only need one.. ;D
Title: Re:[Done 1.5.4] Quick Admin
Post by: Scorpion on August 24, 2003, 04:17:31 PM
Prefect timing, I just put it into a .mod file and I noticed it was giving me errors. So I removed the extra echo. I'll have the .mod file soon.
Title: Re:[Done 1.5.4] Quick Admin
Post by: Scorpion on August 24, 2003, 04:19:53 PM
Board Mod File: http://www.shadow-clanz.com/mods/Quick%20Admin.zip
Title: Re:[Done 1.5.4] Quick Admin
Post by: [Unknown] on August 24, 2003, 05:38:43 PM
I already finished putting this into SMF two days ago.... but, I did the four icons all side by side - I like the look of the icons like that better.

Mind if I "steal" the idea of putting them 2 then 2?

Thanks,
-[Unknown]
Title: Re:[Done 1.5.4] Quick Admin
Post by: Scorpion on August 24, 2003, 05:56:46 PM
I already finished putting this into SMF two days ago.... but, I did the four icons all side by side - I like the look of the icons like that better.

Mind if I "steal" the idea of putting them 2 then 2?

Thanks,
-[Unknown]

Nope, I stole it from YaPP anyway. :P
Title: Re:[Done 1.5.4] Quick Admin
Post by: 1979Z28 on August 24, 2003, 08:22:17 PM
I went ahead and installed this, removing that extra echo ' from the first place, and it works perfectly.

I'd suggest editing your first post with that link, for anybody who doesn't notice it later on down the page
Title: Re:[Done 1.5.4] Quick Admin
Post by: Scorpion on August 24, 2003, 09:03:48 PM
I already fixed it. 8) btw, I had that extra echo there because I accidently copy pasted too much of the code. :-X
Title: Re:[Done 1.5.4] Quick Admin
Post by: Walhalla on September 15, 2003, 02:34:22 PM
Installed it.. but it doesn't work.. getting no errors or something.. I just don't see the quick admin or must I apply some changes in the admin panel?  
Title: Re:[Done 1.5.4] Quick Admin
Post by: Scorpion on September 15, 2003, 02:57:59 PM
are you sure you installed it correctly? it should work...
Title: Re:[Done 1.5.4] Quick Admin
Post by: 1979Z28 on September 15, 2003, 08:38:01 PM
If you edited the files correctly, and uploaded them to the right places, it should work. Maybe refresh the page? If those don't work/aren't the problems, I'm clueless
Title: Re:[Done 1.5.4] Quick Admin
Post by: videoed on October 03, 2003, 09:27:08 PM
Just some short BIG THANKS
Title: Re:[Done 1.5.4] Quick Admin
Post by: markd on October 06, 2003, 07:08:46 PM
Hmm.. When I apply the mod, all I get is a blank white page with the footer at the bottom.  The index page loads fine, but when I got to access a board, everything is blank except for the footer.

This happens when logged in as admin, a user, or a guest.

-markd
Title: Re:[Done 1.5.4] Quick Admin
Post by: Scorpion on October 06, 2003, 07:14:15 PM
Link to site? Maybe you missed a step of the installation? I tested it on a clean install of YaBB SE and it worked fine for me...
Title: Re:[Done 1.5.4] Quick Admin
Post by: markd on October 06, 2003, 07:26:59 PM
Oh, and I used BoardMod to install it, and it installed just fine with no errors, step by step mode.

-markd
Title: Re:[Done 1.5.4] Quick Admin
Post by: markd on October 06, 2003, 07:44:04 PM

Find:
Code: [Select]
global $curposlinks, $cgi, $yytitle, $settings, $start, $modSettings, $viewResults, $ID_MEMBER, $db_prefix;
Replace With:
Code: [Select]
global $curposlinks, $cgi, $yytitle, $settings, $start, $modSettings, $viewResults, $ID_MEMBER, $db_prefix, $qatxt, $qaimg, $sc;

echo '

<script language="JavaScript1.2" type="text/javascript"><!--
function DoConfirm(message, url)
{
if (confirm(message))
location.href = url;
}
</script>';


Okay.. i reinstalled it, but closed the comment line.  notice how you start a comment to hide the javascript functions <!-- so after the second brace } I put a --> to close the comment.

Now, the board loads fine, except, I don't see the extra admin functions next to the posts.

-markd
Title: Re:[Done 1.5.4] Quick Admin
Post by: markd on October 06, 2003, 07:54:44 PM
Okay, it's working now.  It was definately the closing of the comment that fixed it.  Works like a champ now.

thanx!

-markd
Title: Re:[Done 1.5.4] Quick Admin
Post by: Cerberus on October 07, 2003, 01:54:13 PM
Great idea on converting this :) !
Title: Re:[Done 1.5.4] Quick Admin
Post by: Scorpion on October 07, 2003, 07:46:12 PM

Find:
Code: [Select]
global $curposlinks, $cgi, $yytitle, $settings, $start, $modSettings, $viewResults, $ID_MEMBER, $db_prefix;
Replace With:
Code: [Select]
global $curposlinks, $cgi, $yytitle, $settings, $start, $modSettings, $viewResults, $ID_MEMBER, $db_prefix, $qatxt, $qaimg, $sc;

echo '

<script language="JavaScript1.2" type="text/javascript"><!--
function DoConfirm(message, url)
{
if (confirm(message))
location.href = url;
}
</script>';


Okay.. i reinstalled it, but closed the comment line.  notice how you start a comment to hide the javascript functions <!-- so after the second brace } I put a --> to close the comment.

Now, the board loads fine, except, I don't see the extra admin functions next to the posts.

-markd

Thanks for finding that bug. I noticed that in my templates which had the "avoid html tags" <!-- and -->
the message index wouldn't work. Always thought it was a yabbse bug. Btw, all you need to do is get rid of the "<!--" in the message index and it'll work. :)

Updated the boardmod file to new changes
Title: Re:[Done 1.5.4] Quick Admin
Post by: nyntti on November 17, 2003, 02:55:35 PM
hi.

im receiving the same error.

every other pages r ok, but the list of subjets, where the mod should appear (it is there, except the admin text is missing above) is gone, and im having an error (mysql) from line 258, which is:

Quote
             <td class="windowbg2" valign="middle" width="27%" bgcolor="' . $color['windowbg2'] . '">
                  <font size="1">' . $mydate . '<br />' . $txt[525] . ' ' . $lastposter . '</font></td>';
if (($settings[7] == "Administrator") || ($settings[7] == "Global Moderator")) {
   print "<td class=\"windowbg\" valign=\"middle\" bgcolor=\"$color[windowbg2]\"><a href=\"$cgi;action=sticky;threadid=$mnum;sticky=$isSticky;q=1\">$qaimg[1]</a> <a href=\"$cgi;action=lock;threadid=$mnum;q=1\">$qaimg[2]</a> <a href=\"$cgi;action=movethread;threadid=$mnum;q=1\">$qaimg[3]</a> <a href=\"javascript:DoConfirm('$txt[162]','$cgi;action=removethread2;threadid=$mnum;sesc=$sc');\">$qaimg[4]</a></td>";
   }
print <<<EOT
</tr>
EOT;
      }                   <-- HERE SOMEWHERE
   }



what can i do?
Title: Re:[Done 1.5.4] Quick Admin
Post by: Scorpion on November 18, 2003, 10:42:16 PM
I don't see anything wrong. Do you have a link to your boards? And did you install this mod on a clean version of yabb?
Title: Re:[Done 1.5.4] Quick Admin
Post by: nyntti on November 19, 2003, 09:58:53 AM
yes its clean.

first mod.

www.nyntti.com/keskustelu

i've took it off, becouse it didnt work.

dunno what i missed.
Title: Re:[Done 1.5.4] Quick Admin
Post by: Scorpion on November 19, 2003, 02:46:15 PM
I think the problem is that your using a Spanish language pack. This mods edits the English language pack. Since ur using Spanish.lng, the mod looks through that for the proper text. Since there is no qaimg value, it comes up blank.

Also, can you tell me what the mysql error says?
Title: Re:[Done 1.5.4] Quick Admin
Post by: nyntti on November 19, 2003, 03:31:12 PM
im not using spanish language pack, im finnish. and i made the changes in there.

no matter what is the error, but i have a hunch it is the languagefile.....
Title: Re:[Done 1.5.4] Quick Admin
Post by: Scorpion on November 19, 2003, 03:32:47 PM
What does the error say?
Title: Re:[Done 1.5.4] Quick Admin
Post by: nyntti on November 20, 2003, 08:51:19 AM
"Parse error: parse error in /home/int2000/13047/html/keskustelu/Sources/MessageIndex.php on line 448"

its nearly working now.

i dont receive the mysql error anymore, i think it was the server.

here is my MessageIndex.php:
http://www.nyntti.com/keskustelu/Sources/MessageIndex.txt
Title: Re:[Done 1.5.4] Quick Admin
Post by: Scorpion on November 20, 2003, 02:35:20 PM
"Parse error: parse error in /home/int2000/13047/html/keskustelu/Sources/MessageIndex.php on line 448"

its nearly working now.

i dont receive the mysql error anymore, i think it was the server.

here is my MessageIndex.php:
http://www.nyntti.com/keskustelu/Sources/MessageIndex.txt

Well, I don't see anything wrong with line 448. You say its nearly working, what else is wrong?
Title: Re:[Done 1.5.4] Quick Admin
Post by: nyntti on November 20, 2003, 03:18:21 PM
im missing the bottom table too.

u know, the buttons for php and mysl, "YaBB SE Community | Powered by YaBB SE
2001-2003, YaBB SE Dev Team. All Rights Reserved." and stuff.


and the error is annoying.

what is wrong with the code????  ??? :-[
Title: Re:[Done 1.5.4] Quick Admin
Post by: Scorpion on November 20, 2003, 03:19:30 PM
That's something with your template. My mod doesn't change any of that.
Title: Re:[Done 1.5.4] Quick Admin
Post by: nyntti on November 20, 2003, 04:20:30 PM
no, its becouse of the error!
Title: Re:[Done 1.5.4] Quick Admin
Post by: pege on November 21, 2003, 09:20:30 AM
I already finished putting this into SMF two days ago.... but, I did the four icons all side by side - I like the look of the icons like that better.

Mind if I "steal" the idea of putting them 2 then 2?

Thanks,
-[Unknown]

Any plans to put Yapp pages, page management, boxes, or box management into SMF?
Title: Re:[Done 1.5.4] Quick Admin
Post by: newbieyabbie on November 21, 2003, 12:04:59 PM
Just installed it, works great. How do you make the images show up two by two instead of all four next to each other, or in my case under each other, or is that because of the with of my boardindex?
Title: Re:[Done 1.5.4] Quick Admin
Post by: [Unknown] on November 21, 2003, 09:00:40 PM
I already finished putting this into SMF two days ago.... but, I did the four icons all side by side - I like the look of the icons like that better.

Mind if I "steal" the idea of putting them 2 then 2?

Thanks,
-[Unknown]

Any plans to put Yapp pages, page management, boxes, or box management into SMF?

Maybe if I were to die and someone else were to take over development.

-[Unknown]
Title: Re:[Done 1.5.4] Quick Admin
Post by: pege on November 22, 2003, 08:41:34 AM
I already finished putting this into SMF two days ago.... but, I did the four icons all side by side - I like the look of the icons like that better.

Mind if I "steal" the idea of putting them 2 then 2?

Thanks,
-[Unknown]

Any plans to put Yapp pages, page management, boxes, or box management into SMF?

Maybe if I were to die and someone else were to take over development.

-[Unknown]

ahahahaha.....ahem. :)
Title: Re:[Done 1.5.4] Quick Admin
Post by: nyntti on November 22, 2003, 07:37:40 PM
my problem isnt solved yet....
Title: Re:[Done 1.5.4] Quick Admin
Post by: pege on November 22, 2003, 11:23:48 PM
im missing the bottom table too.

u know, the buttons for php and mysl, "YaBB SE Community | Powered by YaBB SE
2001-2003, YaBB SE Dev Team. All Rights Reserved." and stuff.


and the error is annoying.

what is wrong with the code????  ??? :-[

Is the <yabb copyright> tag in your template.php?
is the footer(); included in the script you're calling?
Title: Re:[Done 1.5.4] Quick Admin
Post by: nyntti on November 23, 2003, 07:25:03 AM
cant u see?

its missing only from the boardpage, where all the subjects r listed. the page the mod is affecting.

there i receive the error, and the last tabel is missing. my template has nothing to do with this.
Title: Re:[Done 1.5.4] Quick Admin
Post by: pege on November 23, 2003, 12:18:48 PM
cant u see?

its missing only from the boardpage, where all the subjects r listed. the page the mod is affecting.

there i receive the error, and the last tabel is missing. my template has nothing to do with this.

Then maybe your BoardIndex.php has an error.  If it's not showing the copyright, it may be the "footer();" function is missing from the BoardIndex.php, or that some parse error is causing it to be overlooked.  Save a copy of your current BoardIndex.php, then install a fresh one to see if that corrects the problem.  If so, you know what needs to be modified.  But the footer(); function is what calls the copyright in BoardIndex.php, so I'd make sure that is there and that it's all parsed right.  You're probably going to have to take a close look at your BoardIndex.php to make corrections.

If you want, IM me a copy of your BoardIndex.php, and I'll see if I can spot the problem.
Title: Re:[Done 1.5.4] Quick Admin
Post by: Shadow's Pawn on November 23, 2003, 12:31:22 PM
I'm betting it is a piece of code that isn't closed out properly..
Title: Re:[Done 1.5.4] Quick Admin
Post by: nyntti on November 23, 2003, 02:01:42 PM
no, putting in the original BoardIndex.php doesnt change anything. Im guessing that it aint parsed right too, but i cant write php that well, and i have given my MessageIndex.php in this thread already. So please check it, It must be it.
Title: Re:[Done 1.5.4] Quick Admin
Post by: pege on November 24, 2003, 01:08:20 AM
no, putting in the original BoardIndex.php doesnt change anything. Im guessing that it aint parsed right too, but i cant write php that well, and i have given my MessageIndex.php in this thread already. So please check it, It must be it.

This is your error...

Quote
href=\"javascript:DoConfirm('$txt[162]','$cgi;action=removethread2;threadid=$mnum;sesc=$sc');\">$qaimg[4]</a></td>";
   }
print <<<EOT
</tr>
EOT;
      }
   }
      >>> }  <<<DELETE THIS


I'm using your MessageIndex.php, minus that curly brace, and it works.
Title: Re:[Done 1.5.4] Quick Admin
Post by: edi67 on November 24, 2003, 06:17:01 AM
works perfectly in my yabbse 1.5.4
thank
Title: Re:[Done 1.5.4] Quick Admin
Post by: nyntti on November 24, 2003, 10:28:17 AM
Works fine now, thx big time!

I asked about that code before, and Scorpion told me it was fine.

Thx anyway, for caring.
Title: Re:[Done 1.5.4] Quick Admin
Post by: EliteRides on December 06, 2003, 05:31:37 PM
To save someone else the weeks of trouble... After reinstalling the entire forum, mods and all, a problem came down to the Quick Admin mod.

Code: [Select]
     echo '
         <script language="JavaScript1.2" type="text/javascript"><!--
         function DoConfirm(message, url)
         {
            if (confirm(message))
               location.href = url;
         }
      </script>';

Removed the part above from the step below:

Code: [Select]
<edit file>
Sources/MessageIndex.php
</edit file>

<search for>
   global $curposlinks, $cgi, $yytitle, $settings, $start, $modSettings, $viewResults, $ID_MEMBER, $db_prefix;
</search for>

<replace>
   global $curposlinks, $cgi, $yytitle, $settings, $start, $modSettings, $viewResults, $ID_MEMBER, $db_prefix, $qatxt, $qaimg, $sc;

      echo '
         <script language="JavaScript1.2" type="text/javascript"><!--
         function DoConfirm(message, url)
         {
            if (confirm(message))
               location.href = url;
         }
      </script>';

It rendered the MessageIndex dysfunctional on Macs and in Netscape:
Title: Re:[Done 1.5.4] Quick Admin
Post by: [Unknown] on December 07, 2003, 01:05:03 AM
You forgot the --> before the </script>.

-[Unknown]