Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
you can see it usually by putting something next to the closing quote in that query so if its "; you can put ss"; and it will spit out the string. You may not have any group only events? Hmm let me know I may have to add a check in it.

Sponsored Links
Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
$Grouppostsquery is set to
Code
Bo_Read_Perm = '0'


No wonder it doesn't like it.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
Hmmm ok I just tried the query

SELECT Bo_Keyword
FROM w3t_Boards
WHERE Bo_Read_Perm = '0'
ORDER BY Bo_Keyword ASC

on two different threads database and I recieved no error can you try that in you phpmyadmin?

this is the line that sets it that way
if ($Grouppostsquery == ""){$Grouppostsquery = "Bo_Read_Perm = '0'";}

and thats only cause there are no groups for the person who is viewing the eventspal because he isn't logged in, but if he logs in and say is in group 4 the query should be

SELECT Bo_Keyword
FROM w3t_Boards
WHERE Bo_Read_Perm LIKE '%-4-%'
ORDER BY Bo_Keyword ASC

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
No error, but I don't understand why it's set to 0. I'm logged-in when I run the script. And when I comment out the line, it just returns the same error to the next line.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
so thats also 0 when your logged in hmm ok.. that sheds some light on it..

only way for that to set to 0 is if $Grouppostsquery is empty that all relies on these lines..

[]
if (!$user['U_Groups']) { $user['U_Groups'] = "-4-"; }
$calGrouparray = split("-",$user['U_Groups']);
$calgsize = sizeof($calGrouparray);
$Usergroupquery = "(";
$Grouppostsquery = "(";
$calg = 0;
$calgroupcheck = 0;
for ($i=0; $i<$calgsize;$i++)
{
if (!preg_match("/[0-9]/",$calGrouparray[$i])) { continue; };
if ($adminmodshow == '0')
{
if ($calGrouparray[$i] == '1')
{
$calgroupcheck = 1;
}
if ($calGrouparray[$i] == '2')
{
$calgroupcheck = 2;
}
}
$calg++;
if ($calg > 1)
{
$Usergroupquery .= " OR ";
$Grouppostsquery .= " OR ";
}
$Usergroupquery .= "`U_Groups` LIKE '%-$calGrouparray[$i]-%'";
$Grouppostsquery .= "`Bo_Read_Perm` LIKE '%-$calGrouparray[$i]-%'";
}
[/]

so I am wondering if in fact this line $user['U_Groups'] is working for you. I have seen where some servers can get away with that line and some have to actually set it to a number like $user[2] depending on what element in the $user array has placed the groups function.

if your willing to try one more thing take any custompal box or heck even this script and somewhere towards the top place this

echo $user['U_Groups'];

and see if it returns anything.

Sponsored Links
Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
It returns nothing.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
thats what I thought. the $user['U_Groups'] is not working for you

hmm can you try one last thing.. do a print_r($user); somewhere near the top or in an empty pal and see if you see $user['U_Groups'].. should be around the 14th element. see if you see it whether your logged in or not..

my not logged in shows

Array ( [U_Username] => [U_PicturePosts] => [U_ShowSigs] => [U_Email] => [U_PictureView] => [U_Status] => [U_Privates] => [U_Name] => [U_Title] => [U_Totalposts] => [U_Visible] => [U_Laston] => [U_Language] => [U_TimeOffset] => [U_Groups] => [U_Picture] => [U_Number] => [U_TimeFormat] => [U_Password] => [U_SessionId] => [U_StyleSheet] => [U_FrontPage] => [U_Banned] => [U_SideBar] => )


while my logged in shows values for each element...

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
also make sure you re-download the new zip I just placed up there and try that.

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
Code
print_r($user);


This returned nothing both logged-in and logged-out. The new file doesn't work for me either. I get this:

Code
Fatal error: Call to a member function on a non-object in /home/drumlin/public_html/threads/pals/eventspal.php on line 235

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
okay one more thing.. disable the eventspal.php and put the
print_r($user); in any other palbox. Let me know what happens because at this point I don't know how your running threads or IIP because everything is based off the array($user).

Sponsored Links
Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
Disable the eventspal? I put the script in an empty pal box. Maybe I'm doing something wrong. How about you attach a file for me to run and I'll tell you what happens?

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
I sent you a PM. need ya to get rid of my evenetspal and just do a print_r($users) from any other box.

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
I probably missed a setting somewhere...but here is a question or clarification.

Events that are added to the calendar via the "Add an Event" button (ie not related to a post) are placed in the w3t_Calendars table.

When I run eventspal, everything looks good for me. If I log in as a regular user (non-admin), they cannot see PUBLIC events that were added in this way. Is this correct, or did I miss a switch somewhere?

I downloaded the eventspal off of post #1 in this thread.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
Hmmm not sure I will check again tonite.

maybe related to

// show all Group Dates or just the users in events pal
// 0 - Show all dates for okay board's for all
// 1 - Show all dates for okay board's just for user
$showallgroupdates = '1';

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
Not sure if this will help or not...

#1 - settings I had were as follows, and this is viewing as an ADMIN:
$adminmodshow = '1';
$groupshow = '0';
$showallgroupdates = '0';
$birthdayshow = '0';

#2 - settings I had were as follows, and this is viewing as an ADMIN:
$adminmodshow = '1';
$groupshow = '1';
$showallgroupdates = '0';
$birthdayshow = '0';

#3 - same settings as #2 above, but viewing as a regular user. FYI this Regular User is the one that added the "test" event (visible in #2)...but even though he added it, he cannot see it.

Again...not sure if anything is wrong or not, I JUST started looking through the code. Hope this might help.
Attachments
107171-Untitled-4 copy.jpg (0 Bytes, 52 downloads)

Last edited by Medar; 02/05/2004 11:30 AM.
Joined: Nov 2000
Posts: 210
Member
Member
Offline
Joined: Nov 2000
Posts: 210
I think you need to turn showallgroupdates = "1" on it works with mine that way I think all group dates is the actual events from the calendar itself

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
With showallgroupdates set to 1....I get the same view as I get with #2 above (with showallgroupdates set to zero).

$adminmodshow = '1';
$groupshow = '1';
$showallgroupdates = '1';
$birthdayshow = '0';

This gives me view #2 from above...so I didn't see a visible change.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
I will get back to looking at this once I finish the pollpal. I am one click away from the poll pal. it can do everything but display without hitting submit twice

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
Okay I have fixed Medar's issue. Can ya retry it not Medar? I left out a array merge in the original.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
BTW it opens up a popup box of showday.php you can either remove the _blank from the line with showday.php in it or ask me for the popup box I used on my site at www.couch-tomatoe.cc

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
Will try to get this uploaded this afternoon. Mondays are crazy sometimes.

Many thanks scroungr! I started to look in here to tinker with it myself...but you know how when you write something you tend to know where the potential issue is a LOT better than if you are just sorting through code?

That is where I was...felt like I was reading without my glasses, and figured I would let the pro handle it

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
Ok, two days later, finally got to tinker with this.

The issue is now fixed, it works great! I logged in under various people in and out of groups, and events are displaying properly. Cool deal

However! (hehe) It seems to be ignoring the $totalevents variable if you do are not part of a group that has private events. Here is what I did.

$groupshow = 0. Shows more than $totalevents in the "Upcoming Events" section...whether you are in a private group or not.

$groupshow = 1. Shows more than $totalevents in the "Upcoming Events" section, but ONLY if you are not in a private group.

$groupshow = 2. Shows more than $totalevents in the "Upcoming Events" section...whether you are in a private group or not.

Hope that makes sense. Browsing the code now to see if I can figure it out.

Thanks for the work on this.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
Will take a look tonite. Thanx

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
ok try this Medar I forgot two array_slices.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
fixed another small error. should be almost final.

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
Allrighty - the groupshow issue seems to be resolved, that works great.

The only issues I could find all have to do with the Javascript event popups. In the Upcoming Events section...the popups do not reference any particular page or event. I thought it had to do with possibly calling /pals/showday.php, so I removed the /pals piece, still did not work.

Messing with that a bit.

Other than that, there are some minor glitches in the showday popup, and I think that could be eventspal not pushing some correct variables across. But again, I have not looked at it in depth, just tinkered with it.

Very close now!

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
what you do with that showday is entirely up to you. You can just make it open the page itself by altering the line's

echo "','_blank','scrollbars=yes,toolbar=no,menubar=no,location=no,directories=no,status=no,width=500,height=400,top=100,left=200');">";

to
echo "','toolbar=no,menubar=no,location=no,directories=no,status=no,width=500,height=400,top=100,left=200');">";


you can also remove the line's echo " title=";

you can also just create a box like I have on my site at www.couch-tomatoe.cc

that output is entirely up to you. If Josh ever gets around to updating IIP he can include it if he wishes.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
but if Josh doesn't get moving soon on updating IIP I may have to do it for him.

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
I've been waiting for this to get ready. Looks like you're almost there. I've got some other fixes and such ready in IIP - so if this is good to go - I'll get it all posted.

Good work!

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
np would like to include the showdaypal popup I am using so let me know and I will send it to you.

Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
Joined: Mar 2000
Posts: 528
Going to upload the latest and try some of the popup changes you mentioned scroungr...this will be a nice addition to IIP for the Calendar.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
yeah I have a popup I have on my site that pops up using calendar or events.. it use to open the ubbthreads/showday.php but that also sent the header and footer and well... so I created a showdaypal.php without footer and header...

Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
scrounger,

Two questions:

1) When was the attachment on the first post updated last?

2) Are you going to include your showdaypal file? The current eventspal links events to that non-existant file.

This is a handy pal. I'm just getting ready to roll out my "new and improved" site.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
ah it was all included in the new IIP 5.4.5 so I never bothered. I will update this now though.

Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
I downloaded it yesterday and it wasn't in there... That's why I grabbed this one.

Hmm, will have to look again when I get home could be I missed a setting, but I did compare the two eventspals and they were nothing alike.

Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
Hmmm well I updated this one. the only difference is the settings for this version is listed in this pal and the settings for IIP's is listed in the configpal.php

Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
I'll take another swing at it when I get home. I've been coding heavily the past two weeks trying to wrap up this project, so I can say I have at least one thing done. It's started affecting my mind... I'm writing code in my sleep again...


Joined: Mar 2001
Posts: 644
Member
Member
Offline
Joined: Mar 2001
Posts: 644
Chalk this up to user error.

I had downloaded the latest IIP and then proceeded to use the previous version, since they happened to be right next to each other in my threads hacks archive. I was one file off.

Sorry.

Page 2 of 2 1 2

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Bill B
Bill B
Issaquah, WA
Posts: 87
Joined: December 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)