Jump to content
MakeWebGames

Announcement Mod


Newbie

Recommended Posts

add this into classes

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

and add this where you want it to show

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

sql

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

announcement.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Edited by Newbie
Link to comment
Share on other sites

I wonder about the logic on this, slightly.

 

You only test for 1 or 0, then display 0 if you have non, or 1 if you have 1... or 2... or 3... see where I'm going with this?

 

Surely, the code for the menu link should look like this (Keeping your tags in place)

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

The above will display how many announcements you have, which means an edit to the posting announcement part too;

 

From:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

To:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Link to comment
Share on other sites

Absolutely nothing wrong with the logic, it checks if there are new announcements (1) or if there aren't (0)

The only thing is that if there are new announcements it might be an idea to use "[new]" rather than "[1]"

But there's nothing wrong with the logic

Link to comment
Share on other sites

Absolutely nothing wrong with the logic, it checks if there are new announcements (1) or if there aren't (0)

The only thing is that if there are new announcements it might be an idea to use "[new]" rather than "[1]"

But there's nothing wrong with the logic

Well I see exactly where guest is coming from. Why only set the announcements to 1 when you can display how many they actually have? What if they dont log in for a week or two?

Link to comment
Share on other sites

Well I see exactly where guest is coming from. Why only set the announcements to 1 when you can display how many they actually have? What if they dont log in for a week or two?

Still going to be notified of the new announcement(s), like I said, Announcements [new] or [##] is probably more appropriate than Announcements [1], but there is nothing wrong with the logic

Link to comment
Share on other sites

Still going to be notified of the new announcement(s), like I said, Announcements [new] or [##] is probably more appropriate than Announcements [1], but there is nothing wrong with the logic

Then your logic in itself is quite flawed.

Imagine a Math problem, where you need to equate the value of X, where;

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

X, in this case 1, should never be reflective of multiple occurrences.

Of course, you pointed something out - if they chose "new" instead of "1", then it would be valid, but the second you enter a number, you are telling the user it's a numeric count, which this is not.

So as you said, either something to the effect of "new" is required, or as I said, the logic is wrong and if you're showing numberic, show the value.

If the logic is not wrong, do we assume that;

* if you have 21 new messages, we should just use "Messages [1]"?

* if you have 325 events, "Events [1]", is therefore a valid output, that seems logical?

No, it seems illogical all of a sudden? Yeah, I thought it would.

Edited by Guest
Link to comment
Share on other sites

Keep your hair on friend

My hair is very firmly connected to my head, Sir.

I just feel the need to correct people who try to shoot holes in MY logic, with their own, which doesn't fit in line with how the internet standards have been set.

Imagine loading gmail and seeing "Inbox (1)", but having 200+ emails in there, unread.

How long until you move to another provider, such as outlook, where 200 messages shows as "Inbox (200)"?

Link to comment
Share on other sites

All I meant with my original post was that it seems to have been intended simply to notify users of new announcements, not necessarily how many, in which case however, [new] would have been more appropriate than [1], but there's no point in crying over spilt milk

No need to get so worked up about it, it's frightfully ungentlemanly

Link to comment
Share on other sites

  • 1 month later...
  • 6 months later...
if($user_class->announcement > 0) {

$update = mysql_query("UPDATE `grpgusers` SET `announcement` = 0 WHERE `id` = '".$user_class->id."'");

}

Im curious. Given you do not include the sql to create the column announcement in the grpgusers table is that assumed?

What i mean is, does grpg come out standard with that column?

If it doesnt then i am confused as to how this would actually work correctly.

Link to comment
Share on other sites

Im curious. Given you do not include the sql to create the column announcement in the grpgusers table is that assumed?

What i mean is, does grpg come out standard with that column?

If it doesnt then i am confused as to how this would actually work correctly.

Hmm not too sure. What you can do is use some magic in the user class with __set and __get

Link to comment
Share on other sites

I was just wondering incase someone else uses this and finds it does not work.

Making the column is how i got this to work so i guess i was suggesting to the OP that this should be included in the sqls.

Unless ofcourse the column is supposed to be in the default gRPG table and i was unaware.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...