PDA


View Full Version : [Module] Dynamic Staffpage (vB3.5)


Pages : 1 [2] 3 4

russbo
01-18-2006, 12:29 PM
Thanks! Appreciate it.

I call the advertising character "You", so, without knowing what I was doing, I kind of didi it. :)

rich

interfx
01-22-2006, 10:52 PM
Just installed, works great!!!

One question, how do I define who shows up in the Staff Page? I (the administrator) are there, but how do I add others? ie. Moderators, ...

Thanks in advance -
InterFX

pennylessz28
01-23-2006, 06:20 PM
Still works like a charm.

WrestleMania
01-25-2006, 01:17 PM
I've a problem, when I go to the staffpage, there's nothing on the page, it's white and there's a message and it says me that the file is not found

If a don't tick the box staffpage on the staff page, the page function, there are the module, but not the staffpage (normal). Is there a problem with the staffpage module ? Because when I tick the box staffpage, the page staff page don't function...

theczech
01-25-2006, 03:04 PM
I'm not quite sure what you mean. Can you give us a link?

Did you edit the staffpage.php in any way? Or any of the templates?

WrestleMania
01-25-2006, 03:10 PM
yes I edited the staffpage.php and I wrote this :

$bionum = "6";

Because 6 is the number of the field created...

and I didn't edit the template because there isn't to edit ?

faz
01-25-2006, 03:15 PM
I am not Experience Help Me if you can, Really thankful

this is my Website
http://www.ismailies.com/

I want to Add News or other Stories on the Very Top of Threads ..
Currently its Thread I am not getting how should I insert News , etc on top og the thread.

Center Block should have.
1. News
2. Welcome Text & than
3. Forum Threads



Please Can somebody help me ?

Advice

thanks
Faz

Startinfresh
01-27-2006, 04:09 PM
*nevermind I got it, didn't read it all :(*

wiccaan
01-28-2006, 09:19 PM
Nice mod, I added it to my site, as well as completely redid the whole setup and layout of it. Looks awsome now :D (No offence)

The default setup is nice, but it was a little plain. I have the SQL query now grab the users name, rank, title, age, and a few other stats and list it onto the page for that user.

As well as showing the pic and the bio. I also edited the table structre to show the users reputation, rank image, and a button to PM the user if needed.

All in all, great mod.

TheHeartSmasher
02-11-2006, 08:55 PM
I have it working but no information shows from the bio/staff information that members put in.

I have the vbadvanced index page in the first folder /forums and the forums in /forums/main

So when I click on the link to a members profile on the staff page it takes me to /member.php?u=2
instead of
/forums/main/member.php?u=2

theczech
02-12-2006, 02:17 AM
Nice mod, I added it to my site, as well as completely redid the whole setup and layout of it. Looks awsome now :D (No offence)

The default setup is nice, but it was a little plain. I have the SQL query now grab the users name, rank, title, age, and a few other stats and list it onto the page for that user.

As well as showing the pic and the bio. I also edited the table structre to show the users reputation, rank image, and a button to PM the user if needed.

All in all, great mod.


Can you post your code, please? I was thinking about doing something like that, this would save me a lot of time.

Thanks!!

By the way, what's your website?

N3mesis NL
02-12-2006, 11:23 AM
EDIT: nvm, works now :)

TheHeartSmasher
02-12-2006, 12:38 PM
Go to the staff page/template and uncheck the other modules that will fix everything up for you. Make sure that staff is the only thing checked in your ACP.

theczech
02-12-2006, 12:55 PM
I have a problem, look here: http://www.fantasy-network.com/vbulletin/index.php. As you can see the staff part uses the center and right collumn, how do i fix it? I have the poll section on the right, but that doesnt help. Please help me with this. (Love the mod btw :) )


Look up earlier in this very thread I posted info on how to fix that.

You can see the final result here. (http://www.teammr.com/index.php?page=roster&)

N3mesis NL
02-12-2006, 01:24 PM
Tnx guys, you really helped me out here.

rrokdoka
02-14-2006, 12:37 AM
how did you guys get it to work mine goes crazy whenever i try to install it..... does anyone wanna help me?

gothic1213
02-14-2006, 01:09 AM
how did you guys get it to work mine goes crazy whenever i try to install it..... does anyone wanna help me?
You wanna try moderating your language to start with!

theczech
02-14-2006, 10:46 AM
how did you guys get it to work mine goes crazy whenever i try to install it..... does anyone wanna help me?

I followed the instructions that came with it. Worked for me.

-Haro`
02-16-2006, 01:44 AM
i was wondering if there is a way instead of it saying like "Administrator" and "Veteran Moderator" If I could make those custom values that will fit my site if this is possible please tell me how to do so.

theczech
02-16-2006, 10:23 AM
i was wondering if there is a way instead of it saying like "Administrator" and "Veteran Moderator" If I could make those custom values that will fit my site if this is possible please tell me how to do so.

Could you be more specific? Yes, it is possible to do, but how to go about it depends on what exactly it is you want.

-Haro`
02-16-2006, 05:05 PM
well i'd like where it says "Adminstrators" and all that on the bars to say well according to my forum "GFX Gods" therefore saying GFX Gods haRo`

theczech
02-17-2006, 02:40 AM
Any other changes? Just GFX Gods instead of Administrator?

-Haro`
02-18-2006, 02:29 AM
GFX Gods in place of Administrators, GFX Designer in place of VeteranModerators, and dR Staff in place of Moderators

-Haro`
02-21-2006, 11:46 AM
bump!, please someone one help me with thist

theczech
02-21-2006, 06:43 PM
GFX Gods in place of Administrators, GFX Designer in place of VeteranModerators, and dR Staff in place of Moderators

Replace this code in staffpage.php:

switch ($susergroup)
{
case "5":
$staffrank = "VeteranModerator";
$staffname = "Veteran Moderator";
break;

case "6":
$staffrank = "Administrator";
$staffname = "Administrator";
break;

case "7":
$staffrank = "Moderator";
$staffname = "Moderator";
break;
}

with this code:

switch ($susergroup)
{
case "5":
$staffrank = "VeteranModerator";
$staffname = "GFX Designer";
break;

case "6":
$staffrank = "Administrator";
$staffname = "GFX Gods";
break;

case "7":
$staffrank = "Moderator";
$staffname = "dR Staff";
break;
}

I bet you're going "Oh, I could have figured that out myself!!! :eek: " LOL

-Haro`
02-22-2006, 03:39 PM
now i get this error

Parse error: syntax error, unexpected '=' in /home/cameron/public_html/forums/modules/staffpage.php on line 27

theczech
02-22-2006, 09:43 PM
now i get this error

Parse error: syntax error, unexpected '=' in /home/cameron/public_html/forums/modules/staffpage.php on line 27

Double check the changes you made to your staffpage.php. You must have made some oopsy when editing the code.

If you don't find anything, then restore your original staffpage.php file and start over. You don't even have to copy & paste the whole code I posted above. As I'm sure you've noticed all you have to do is edit the lines that start $staffname = "...." This line dictates what each usergroup is going to be called on your staffpage.

interfx
02-25-2006, 11:17 AM
Is there any way to reorder the list of the moderators showing up? It is not alphabetical...

Any way to change the sort order?

theczech
02-25-2006, 11:32 AM
Is there any way to reorder the list of the moderators showing up? It is not alphabetical...

Any way to change the sort order?

Open up your staffpage.php and look at this section of the code:

$result = $db->query_read("SELECT userfield.userid, user.userid, user.username, user.membergroupids, user.usergroupid, user.avatarrevision, user.profilepicrevision, customprofilepic.dateline, customprofilepic.filename, userfield.$biofield
FROM " . TABLE_PREFIX ."userfield AS userfield
INNER JOIN " . TABLE_PREFIX ."user AS user ON (userfield.userid=user.userid)
LEFT JOIN " . TABLE_PREFIX ."customprofilepic AS customprofilepic ON (customprofilepic.userid=user.userid)
WHERE FIND_IN_SET(5,user.membergroupids) OR FIND_IN_SET(6,user.membergroupids) OR FIND_IN_SET(7,user.membergroupids)
OR (user.usergroupid = 5) OR (user.usergroupid = 6) OR (user.usergroupid = 7)
ORDER BY userfield.userid ASC
");

The very last part of this command is ORDER BY userfield.userid ASC");

You can change that line to ORDER BY user.uername ASC"); to list them alphabetically by their name.

interfx
02-25-2006, 05:26 PM
That did it...

ORDER BY user.username ASC

Thanks again...

TunerNetwork
03-20-2006, 10:21 PM
http://www.tunernetwork.com/index.php?page=staff

It appears that my admins and moderators are repeating themselves....any ideas?

theczech
03-21-2006, 10:21 AM
Check their user settings, maybe they are members of multiple usergroups. If that's not the case, post your code of staffpage.php and your template adv_portal_staffmember here for us to take a look at.

Thanks!

wissamnasr
05-19-2006, 04:00 AM
I'm just having 1 problem
my footer is messed up
http://www.oneforum.org/index.php?page=staff
how can I fix it, please!

FLMom
05-19-2006, 10:38 AM
Everything is in correctly and I am getting

Fatal error: Call to a member function on a non-object in /XXXXXXXXXXXXXXXXXX/modules/staffpage.php on line 34

Is this common or what can I change in that line to fix it?

FLMom
05-20-2006, 11:36 AM
bump :D

FLMom
05-22-2006, 09:15 AM
Hello...any one out there?

murrtex
05-23-2006, 01:02 PM
I get same error too..:(

FLMom
05-27-2006, 03:59 PM
I am still needing help with this! Can anyone on this site help me with this...please?!

+buG
06-07-2006, 08:53 PM
I would like to specify which usergroup is displayed on the page to include more than just staff. Is this possible?

soletrader
08-06-2006, 02:37 AM
Does this work on 3.6 gold?

eJM
08-06-2006, 03:04 AM
I would like to specify which usergroup is displayed on the page to include more than just staff. Is this possible?
Please see post number 1 of this thread for a link to a thread on the autor's site about modifications.
Does this work on 3.6 gold?
Yes, the demo link, also in the first post of this thread, leads to the author's site where he is using vB3.6.0 and vBa 2.2.0.

Jim

Kesomir
08-06-2006, 06:49 AM
Yes. The demo is running on 3.6 gold.

FLMom
08-08-2006, 02:34 AM
I attempted to do this module again. At this time I am still not having any luck. I get this
Fatal error: Call to a member function on a non-object in XXXXXXXXXXXXX/forums/modules/staffpage.php on line 34
http://www.myparentconnection.com/index.php?page=staff&$session

The profile field, template, module, and page were all created by the letter. The bio # is 1. On the page only the staff page is checked. I am running out of ideas.

Help?

bhxtyrant
09-02-2006, 11:34 PM
Hey guys,
I just installed this module and it works perfectly but i wanted to ask if someone can help me with a modification for it.Basically i would like to have it display each staff members

Custom Title
Age (if filled in by member)
Location (if filled in by member)
E-mail Member link
PM member link

Then have the custom Biography field display below the above info.I don't know a thing about doing this so any and all help would be great.Thanks for the time.

Kesomir
09-03-2006, 05:18 AM
I attempted to do this module again. At this time I am still not having any luck.

The profile field, template, module, and page were all created by the letter. The bio # is 1. On the page only the staff page is checked. I am running out of ideas.

Help?

FLMom, the line you get an error on only sets the biofield variable. Did you edit the file and set bionum correctly?

If you did try replacing the line with

$biofield = "field1";

Assuming 1 is your bio number.

..Basically i would like to have it display each staff members

Custom Title
Age (if filled in by member)
Location (if filled in by member)
E-mail Member link
PM member link

Then have the custom Biography field display below the above info.I don't know a thing about doing this so any and all help would be great.Thanks for the time.

OK, what you wan't to do isn't hard, but you'd need to set up some of those values as seperate fields (same as you did for biography), then add the data into the file. Others you will pull directly from the database and others yet (age) will need to be calculated. You can simply reuse most of the code in the file -

find the line:

$susergroup = $row['usergroupid'];

add after:

$scustomtitle = $row['field18'];

(assuming 18 was the field number for your custom title). The rest are done in a similar way, but because they are not custom fields, you'd call them using their title. You could load phpmyadmin and check the database to get the field names, I assume location would be "location" etc and that age is calculated from the date of birth and could simply be calculated from the data once called.

you would then place the $scustomtitle in the section between lines 90 and 109 to output that data.

The links you want will probably just use the userid in them. Hover over one of the links -eg PM -and copy it. replace the part that has the number in with the variable $userid when writing the html.

DOn't forget you'll also need to include the fields you're pulling from the db in the query (lines 36-43) otherwise the script won't pull the info you want from the database in the first place.

Good luck! and share your work if you get it working nicely.

bhxtyrant
09-03-2006, 05:41 AM
Thanks for the reply Kesomir,Just wanted to ask one more question before proceeding.Basically i was wondering why i would need to make another field for Age.Reason i ask is because this seems to be a default field in VB 3.5.4 there isnt a field that was created for it in "user fields" but it does show up in user profile when filled in.if thats the case isn't there a way i can use the default field for this one?

Kesomir
09-03-2006, 12:23 PM
you don't need to make another field for it, but <as far as I know> it isn't stored as a value in the database that you can simply call. The age is calculated from the date of birth.

You can't simply call the value so you have two options:

#Use the vbulletin function that calculates the age

#Write a function in the script to do the same thing

I recommended to write the function in the script because I think it would be quicker than calling the vb one and you don't have to worry about dependencies when they change vbulletin, but either can work.

Using the vb functions properly is more efficient though and once you've learnt how to do so leaves you in a better position to write hacks for vb.

Your call - remember vbulletin.org can probably help you if you run into probs and there are good guides over there for this sort of stuff.

bhxtyrant
09-03-2006, 02:51 PM
Thanks for those answers,always appreciated.Yeah i go to VB.org alot these days they always help me in learning new things.But i always try to check with the author of the hack/mod first since they obviously would know the most about something they made :) i'll be sure to post an update on my progress when i am done.

Oh and another Question is there a way to add Paging to this module?So when there are a certain amount of staff displayed it will break the rest onto a second page adding "Page 1,2" at the bottom in the same way forum topics are?

Also can i use <if> commands in your module?i edited some portions to look like this.

$$staffrank .= "<div align=\"left\"><b>Name-</b>".$row[field6]."</div>";
$$staffrank .= "<div align=\"left\"><b>Staff Occupation-</b>".$row[field7]."</div><br />";
$$staffrank .= "<div align=\"left\"><b>Biography-</b>".$bio."</div>";

But i wanted to make it where "Name-,Staff Occupation-,and Biography-" do not show unless those fields are filled in.

bhxtyrant
09-07-2006, 11:20 PM
small bump

Kesomir
09-10-2006, 04:50 AM
you can use php if conditionals in the file, but not vb ifs

eg:

if (isset($row[field6])){
$$staffrank .= "<div align=\"left\"><b>Name-</b>".$row[field6]."</div>";
}

in this way you check to see if a variable is set or has a value and if it does it appends the line to the staffrank output.

Paging is something of a more involved mod.

Simplist way to do it would be to set your cutoff point as a variable in the top of the file and pass a string via url. If the value is set to a particular page only output between x and y where x is the limit value x the page number + 1 and y is x + limit value. Have a google for mysql limit commands, not sure if you can start after the firsat return. If you can - great. If not you'll have to write code to do it.