Log in

View Full Version : Mini Mods - [DBTech] User Spotlight v1 (vB3)


DragonByte Tech
12-01-2010, 10:00 PM
DragonByte Technologies are proud to present User Spotlight v1: A mini mod to show a random member on your forumhome page.


Why User Spotlight?

DBTech's User Spotlight mod lets you display a random member on your forum home page as a way to increase member commmunication.

-------------------------------------------------------------------------------------------

If you like this mod please hit the https://vborg.vbsupport.ru/external/2015/08/1.png button to the right ---->

Please remember to click the, https://vborg.vbsupport.ru/external/2015/08/2.png button to the right if you installed the mod ---->

What does 'Marking As Installed' do ?

* It helps you to stay on top of updates - members who have installed modifications will be notified by us whenever new updates are available.

* For security issues - vbulletin.org will contact all members who have installed a modification whenever a security issue is brought to their attention.

* Marking a modification as installed also helps us know how many people are using our work, giving us extra incentive to provide more features and new modifications.

We appreciate the support!
-------------------------------------------------------------------------------------------

Priority support for this version is handled at the Developers Website.

-------------------------------------------------------------------------------------------

Translations available @
Support for translations handled by the translator in its respective threads only.

-------------------------------------------------------------------------------------------

[U]Major Features

ForumHome Integration: Members' details will show in the infobar on the forumhome.

-------------------------------------------------------------------------------------------

To Install:

Upload all files in the "upload" folder to your forum.
Import the product file via the product manager in your AdminCP.
Done!----------------------------------------------------------------------------------

Feature List
Random user selected every night
Admin override of selected user
Admin variables to limit selected users by number of posts, reputation and days active

EddyMaxx
12-02-2010, 12:40 AM
Works great. Thanks.

3.8.6

marshal_ramdev
12-02-2010, 01:18 PM
thanks let me try it :)

bada_bing
12-02-2010, 04:57 PM
I would like to use this with vbportal, how can I convert this? I think that listing a spotlight member in the whats going on section is hidden as most members dont scroll down that far

FreshFroot
12-02-2010, 10:43 PM
Agreed. Though I personally just moved it to another location.

I think a great idea would be having an option to set it at a few locations like how the shoutbox does it.

Above forums, Above nav bar, below forums, below nav bar etc...

EddyMaxx
12-03-2010, 12:08 AM
Yeah allowing it to be posted in other locations would be great.

EddyMaxx
12-03-2010, 01:41 AM
Also, in your code you have the collapse images set to your own custom template folder ("impact"). You should leave to the default /images.

No biggie...just an FYI to other members who can manually edit it.

DragonByte Tech
12-03-2010, 07:02 AM
Also, in your code you have the collapse images set to your own custom template folder ("impact"). You should leave to the default /images.

No biggie...just an FYI to other members who can manually edit it.

Agreed. Though I personally just moved it to another location.

I think a great idea would be having an option to set it at a few locations like how the shoutbox does it.

Above forums, Above nav bar, below forums, below nav bar etc...

Eddy, thanks for catching that, I'll fix it in the next release.
FreshFroot, thanks for the idea, I'll add the option to change it in the next release.

DragonByte Tech
12-03-2010, 07:07 AM
I would like to use this with vbportal, how can I convert this? I think that listing a spotlight member in the whats going on section is hidden as most members dont scroll down that far

Is vBPortal even being developed anymore? I don't have a copy of it and from what I've seen it's a dead mod. Of course we could be talking about different things?

DragonByte Tech
12-03-2010, 08:05 PM
Just uploaded 1.1.0
Adds reputation
Adds Threads with link to search for user threads
Adds ACP option to disable reputation
Adds ACP option to set max width and height of Avatar
Adds ACP option to display below navbar or below Active Users
Will only display most active forum if user has permissions to view, will hide field if user can't view any of the forums
Also fixes a custom avatar stored on filesystem location problem.

Warlord
12-04-2010, 08:23 PM
Installed this, but it seems to only be showing the same member no matter how many times I refresh the screen. Does this change on a daily basis?

FreshFroot
12-05-2010, 03:30 AM
Installed this, but it seems to only be showing the same member no matter how many times I refresh the screen. Does this change on a daily basis?

yep. Read the description! Come on it's not hard to read everything...

Feature List

* Random user selected every night

Warlord
12-05-2010, 03:40 AM
Sorry, must have missed that.

yotsume
12-05-2010, 05:48 AM
Lost at the bottom of the forum doesn't seem like such a "spotlight" to me...

DragonByte Tech
12-05-2010, 10:44 PM
Lost at the bottom of the forum doesn't seem like such a "spotlight" to me...

You can also have it up at the top above the forums.

Geek Specialtie
12-05-2010, 10:52 PM
It would be nice to have the ability to enter how often it changes.

I would like to make it a spotlight for the week for example, so it would change once a week rather than every day.

DragonByte Tech
12-06-2010, 05:54 PM
It would be nice to have the ability to enter how often it changes.

I would like to make it a spotlight for the week for example, so it would change once a week rather than every day.

I was actually thinking about adding that :)
I'm going to add an option to run the new user selection hourly/daily/weekly

Hornstar
12-07-2010, 05:06 AM
I wouldn't mind to have something like this in my sidebar. What would I need to do for this?

DragonByte Tech
12-20-2010, 05:35 AM
I fixed a problem with some forums scheduled task on vB3. I also added the ability to specify the usergroups that can view the spotlight and if it will run hourly, daily or weekly.

Geek Specialtie
12-20-2010, 07:26 AM
I fixed a problem with some forums scheduled task on vB3. I also added the ability to specify the usergroups that can view the spotlight and if it will run hourly, daily or weekly.

Awesome!

I'm going to try it out.

Blueracer66
12-20-2010, 10:49 PM
Thanks for sharing. I marked this as Installed and I also Nominated it. It would be nice to make the Username bold (italic, etc.) and be able to select what stats to display, etc.

Geek Specialtie
12-28-2010, 06:35 AM
Another nice option would be to have the ability to select a check box to show other profile information in the user spotlight. Like signature, location or other added profile fields.

Blueracer66
12-28-2010, 02:24 PM
Another nice option would be to have the ability to select a check box to show other profile information in the user spotlight. Like signature, location or other added profile fields.

Be able to select Custom Fields would be awesome.

Hellmaster
12-28-2010, 03:20 PM
At the bottom of the DBTech AdminPanel says something like:

WARNING !!! This field is set by a scheduled task

(twice)

and the value is 1, if I change it, returns to 1. So ALWAYS show on forumhome user ID 1 (administrator)...

Hellmaster
12-28-2010, 04:53 PM
At the bottom of the DBTech AdminPanel says something like:

WARNING !!! This field is set by a scheduled task

(twice)

and the value is 1, if I change it, returns to 1. So ALWAYS show on forumhome user ID 1 (administrator)...

Forget it, works perfect!

Geek Specialtie
12-29-2010, 03:11 AM
It's changing daily form me although it is set for weekly.

DragonByte Tech
12-29-2010, 05:11 AM
It's changing daily form me although it is set for weekly.

Sorry about that, there was an error in the cron file. The new package I just uploaded fixes it.

DragonByte Tech
12-29-2010, 05:12 AM
Be able to select Custom Fields would be awesome.

Are you talking about custom profile fields or something else? If it's the profile fields I think I can work that in, I'll try it out.

Geek Specialtie
12-29-2010, 06:38 AM
Sorry about that, there was an error in the cron file. The new package I just uploaded fixes it.

Thanks I'll update it.

Are you talking about custom profile fields or something else? If it's the profile fields I think I can work that in, I'll try it out.

Yes I think the ability to select standard profile fields like the signature would be nice, custom profile fields would be good too.

Danny Diamond
12-29-2010, 11:38 AM
It would be nice if we could get the same markups as their current usergroups instead of just the small black text. It doesn't really stand out at all.

FLASHYAN
12-29-2010, 02:36 PM
Works great. Thanks.

but

how can i change direction to - right to lift ( rtl )

FLASHYAN
12-29-2010, 03:05 PM
Works great. Thanks.

but

how can i change direction to - right to lift ( rtl )

now already changed frome

dbtech_spotlight_userinfo Template

thanks dude : )

DragonByte Tech
12-30-2010, 09:07 PM
New version has ability to select to display:
Signature
Occupation
Location
Reputation

You can also display any number of custom profile fields

Switched plain username with musername (usergroup colored markup username)

Let me know if there are any problems.

Blueracer66
12-30-2010, 09:32 PM
Everything is working fine except for images. This is what I get for users with images:
http://allconsolegamers.com/community/image.php?type=sigpic&userid=74&dateline=129107968 6
Some small images do show. :)

TNCclubman
12-30-2010, 10:23 PM
Please please please make an option to display only members that have uploaded a profile image (not avatar)

and then use the profile image as the image in your spotlight section.

Most my members use profile pics and not avatars anymore.

Danny Diamond
12-30-2010, 10:27 PM
It would be great if it was really a spotlight to emphasize the username even more than it is now. Overall fun mod. Thanks for creating.

DragonByte Tech
12-31-2010, 02:30 AM
Everything is working fine except for images. This is what I get for users with images:

Some small images do show. :)

It must not be parsing the signature image, I'll check the code.

Please please please make an option to display only members that have uploaded a profile image (not avatar)

and then use the profile image as the image in your spotlight section.

Most my members use profile pics and not avatars anymore.

I'll see what I need to do for that

It would be great if it was really a spotlight to emphasize the username even more than it is now. Overall fun mod. Thanks for creating.

What are you thinking? Like having the username larger?

Blueracer66
12-31-2010, 02:34 AM
What are you thinking? Like having the username larger?

How about being able to style the user name with css like the user title? (<span color=, etc. </span>)

Thanks for sharing this mod with us!

DragonByte Tech
12-31-2010, 04:16 AM
Have about being able to style the user name with css like the user title? (<span color=, etc. </span>)

Thanks for sharing this mod with us!

I could add the span tag in here with a variable for the style variables. Good idea :)

Blueracer66
12-31-2010, 05:38 AM
I could add the span tag in here with a variable for the style variables. Good idea :)

Thanks, I'm glad you got what I wrote. Looking forward to heard from you again. :p lol

DragonByte Tech
01-01-2011, 07:44 AM
Some new additions in 1.5.0
ACP option to modify username with CSS
ACP option so you can specify what usergroups the user can be pulled from
Fixed sigpic parsing in signature
Added option to specify if avatar or profile picture is used, which gets selected first and if one or the other is required

Blueracer66
01-01-2011, 01:56 PM
Some new additions in 1.5.0
ACP option to modify username with CSS
ACP option so you can specify what usergroups the user can be pulled from
Fixed sigpic parsing in signature
Added option to specify if avatar or profile picture is used, which gets selected first and if one or the other is required

I'll check it out and report back to you!

Warlord
01-02-2011, 09:15 PM
I had the first version of this installed and it seemed to work but when I upgraded everything went kablooey.

The avatars stopped showing up, although I did have a lot more options in the Admin CP.

I tried removing the hack entirely and reinstalling but that seriously destroyed the layout of my forumhome template and I got this error message.

Warning: in_array() [function.in-array]: Wrong datatype for second argument in [path]/dbtech/spotlight/core/class_fetchuser.php on line 55

Warning: in_array() [function.in-array]: Wrong datatype for second argument in [path]/dbtech/spotlight/core/class_fetchuser.php on line 56

Warning: in_array() [function.in-array]: Wrong datatype for second argument in [path]/dbtech/spotlight/core/class_fetchuser.php on line 57

Warning: in_array() [function.in-array]: Wrong datatype for second argument in [path]/dbtech/spotlight/core/class_fetchuser.php on line 58

Looks like if I check Location, Occupation and Reputation under the "Alternate Additions" the errors go away. They still don't show up in the user spotlight when checked though. I went to uncheck them and see if I could reproduce the error and they won't stay unchecked.

The only one that will go back and forth between checked and unchecked is Signature. It doesn't show the signature when you check it though and I get this error (in addition to the screen layout going bonkers).

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/functions.php(1455) : eval()'d code on line 5

DragonByte Tech
01-02-2011, 09:50 PM
I had the first version of this installed and it seemed to work but when I upgraded everything went kablooey.

The avatars stopped showing up, although I did have a lot more options in the Admin CP.

I tried removing the hack entirely and reinstalling but that seriously destroyed the layout of my forumhome template and I got this error message.



Looks like if I check Location, Occupation and Reputation under the "Alternate Additions" the errors go away. They still don't show up in the user spotlight when checked though. I went to uncheck them and see if I could reproduce the error and they won't stay unchecked.

The only one that will go back and forth between checked and unchecked is Signature. It doesn't show the signature when you check it though and I get this error (in addition to the screen layout going bonkers).

Can you try the 1.5.2 version and let me know if you still have the same problems?
I moved the code around dealing with the errors you are getting and they shouldn't show up anymore.

EnigmaVariation
01-02-2011, 09:59 PM
Hi there. I love this mod and have installed it. I don't have the updated version since the other one worked fine for me on 3.8.3.

I was wondering if you could consider adding in Minimum days since last post? I have some users that log in regularly but have not posted in a while. It would be nice to have this additional filter option if possible. Thanks for reading. :)

DragonByte Tech
01-02-2011, 10:23 PM
Hi there. I love this mod and have installed it. I don't have the updated version since the other one worked fine for me on 3.8.3.

I was wondering if you could consider adding in Minimum days since last post? I have some users that log in regularly but have not posted in a while. It would be nice to have this additional filter option if possible. Thanks for reading. :)

I added it for 1.6.0, just waiting for a couple troubleshooting fixes before I release it.

Warlord
01-02-2011, 11:04 PM
Can you try the 1.5.2 version and let me know if you still have the same problems?
I moved the code around dealing with the errors you are getting and they shouldn't show up anymore.

Okay, so I uninstalled the old one, reinstalled with product version 1.5.2 and overwrote all of the FTP files with the new ones.

Well, the layout problems seem to be gone when this is active and it looks like the boxes check and uncheck like they should for Alternate Additions.

Bugs:

Avatars still don't show up no matter what I select in the drop down box.
None of the Alternate Additions appear in the User Spotlight when they are checked.
Custom Username CSS doesn't appear to work.
When the signature box is checked I still get the following error.

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/functions.php(1455) : eval()'d code on line 5

EDIT: Just wanted to note that I'm on vBulletin 3.8.4

EnigmaVariation
01-02-2011, 11:40 PM
Hey Warlord, for the avatar issue, did you change the avatar dimensions to whatever you allow on your forum? I think that the default on the mod was 80 x 80 but I had to change mine to 130 x 130 to get mine to display since that is what I allow on my forums. Just a thought. Trying to help out. :)

Warlord
01-03-2011, 12:09 AM
Good lookin' out Enigma, but unfortunately that didn't seem to help. :(

DragonByte Tech
01-03-2011, 05:32 AM
Okay, so I uninstalled the old one, reinstalled with product version 1.5.2 and overwrote all of the FTP files with the new ones.

Well, the layout problems seem to be gone when this is active and it looks like the boxes check and uncheck like they should for Alternate Additions.

Bugs:

Avatars still don't show up no matter what I select in the drop down box.
None of the Alternate Additions appear in the User Spotlight when they are checked.
Custom Username CSS doesn't appear to work.
When the signature box is checked I still get the following error.



EDIT: Just wanted to note that I'm on vBulletin 3.8.4

Is the avatar not showing at all or is it a broken link?
Maybe you modified the template with a previous version and didn't revert? That's a possible reason why none of the additional fields are showing up at all.

The signature thing is weird. I installed 3.8.4 and the mod on my dev and I don't get that error with the signature enabled. Maybe it's something in the users sig that is messing it up? Can you pm me the text that's in the sig so I can try it out locally?

Warlord
01-03-2011, 07:05 PM
Well I feel rather foolish. You were right about the template not being reverted. I had assumed that by removing the hack entirely I had also removed the old template. Silly me.

Okay, so avatars seem to be working now.

Custom Username CSS and Custom Profile Fields don't seem to be working still (yes, I made sure the member in the spotlight had filled out the Custom Profile Field).

The only other issue I'm having now is that when the signature block is checked my forum layout goes bonkers. It's really not a big deal for me because I'm not going to include signatures in my spotlight but I just thought I'd point it out.

I get this error at the very top of my screen:

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in [path]/includes/functions.php(1455) : eval()'d code on line 5

My page layout looks like the attached image. The text in his signature appears to be a BBcode link to his blog. (We don't allow HTML in signatures).

I should also note that I have Cyb - Sub-Forum Manager installed. Perhaps the two hacks just conflict for some reason. (CSS issues?)

I also noticed in the template there seems to be an if statement to span 3 columns, but I don't see the option in the admin cp anywhere. Am I just missing it?

DragonByte Tech
01-04-2011, 08:17 AM
Well I feel rather foolish. You were right about the template not being reverted. I had assumed that by removing the hack entirely I had also removed the old template. Silly me.

Okay, so avatars seem to be working now.

Custom Username CSS and Custom Profile Fields don't seem to be working still (yes, I made sure the member in the spotlight had filled out the Custom Profile Field).

The only other issue I'm having now is that when the signature block is checked my forum layout goes bonkers. It's really not a big deal for me because I'm not going to include signatures in my spotlight but I just thought I'd point it out.

I get this error at the very top of my screen:



My page layout looks like the attached image. The text in his signature appears to be a BBcode link to his blog. (We don't allow HTML in signatures).

I should also note that I have Cyb - Sub-Forum Manager installed. Perhaps the two hacks just conflict for some reason. (CSS issues?)

I also noticed in the template there seems to be an if statement to span 3 columns, but I don't see the option in the admin cp anywhere. Am I just missing it?

I doubt it's conflicting with the sub forum manager. Most likely the error is screwing up code that's getting outputted and that is messing up the layout.
I'm not sure what's causing it. I have the same thing in my sig on my dev site.

The 3 column span is for the users that have it set to show below the navbar. I needed to have some additional formatting for it to look right.

What are you putting in the custom field setting? Are you putting the number or the whole thing? Like field5 or just 5?

Warlord
01-05-2011, 11:56 PM
The Custom Profile Fields seem to be working now. I guess it just needed some time to reset itself?

DragonByte Tech
01-06-2011, 01:13 AM
The Custom Profile Fields seem to be working now. I guess it just needed some time to reset itself?
Hmm, it doesn't store any data so not sure why it started working. Not going to complain though :)

DragonByte Tech
01-06-2011, 01:18 AM
Few small changes with 1.6.0
Added last post date to the selection criteria and fixed problem with avatar url

Geek Specialtie
01-10-2011, 01:19 AM
I just updated to 1.6.1 and the profile image and avatars are not showing.

The image path is not generated correctly.

I have my forum installed in a subdirectory, /forum, the img src for both do not include the subdirectory in the path.

it generates
domain.com/customavatars/avatar1_5.gif
when it should be
domain.com/forum/customavatars/avatar1_5.gif

DragonByte Tech
01-10-2011, 06:48 PM
I made an update with 1.6.2
Hopefully fixed the avatar issues with the different installation layouts, pretty much replicated the way vB sets the path to the avatar/profile pic
Fixed bbcode not parsing on custom fields
Switched code to use existing data so was able to eliminate all but 2 custom db queries, should be better on performance now.

Geek Specialtie
01-10-2011, 07:19 PM
I made an update with 1.6.2
Hopefully fixed the avatar issues with the different installation layouts, pretty much replicated the way vB sets the path to the avatar/profile pic
Fixed bbcode not parsing on custom fields
Switched code to use existing data so was able to eliminate all but 2 custom db queries, should be better on performance now.

My profile images and avatar images are working again. Thanks for the update.

EnigmaVariation
01-13-2011, 03:30 AM
I upgraded to the latest version 1.6.2 (uploaded new files and installed new xml) but now it won't randomly select anyone in the scheduled tasks. Anyone else having this issue? Should I completely uninstall, delete all of the files off my server and reupload/reinstall?

DragonByte Tech
01-13-2011, 05:31 AM
I upgraded to the latest version 1.6.2 (uploaded new files and installed new xml) but now it won't randomly select anyone in the scheduled tasks. Anyone else having this issue? Should I completely uninstall, delete all of the files off my server and reupload/reinstall?

What do you have for the settings?
Maybe something in there is not letting it select a new user

EnigmaVariation
01-16-2011, 11:36 PM
Dragonbyte-Tech: Spotlight - General Options

Spotlight Active? - Yes

Spotlight Location - Below Active Users

When to run - Daily

Image Type - Avatar/Profile Image - Image Not Required

Avatar Maximum Height - 130

Avatar Maximum Width - 130

Minimum Posts - 100

Minimum Reputation - 0

Minimum Days - 7

Minimum Days since Last Post -14

Custom Username CSS (not used)

Custom Profile Fields - 39

Alternate Additions - none checkmarked

Select Groups/Allowed Groups - same selected in each

Spotlight Member ID - it always selects user 1 if I don't put one in there myself - it was working fine before I upgraded to the latest version - currently has user ID I put in there - 19130

Spotlight Next Cron Run - 1295240112

EnigmaVariation
01-17-2011, 03:03 AM
Hm, it started working again on its own. I will keep you updated if there is a glitch again. :)

DragonByte Tech
01-17-2011, 09:00 AM
Hm, it started working again on its own. I will keep you updated if there is a glitch again. :)

I'm not sure what groups you have selected or the volume of posts your users have but also make sure you have users in those groups with over 100 posts. It might be selecting the same person over and over.

It creates a scheduled task log entry every hour telling you what it's doing. If you think something is up you can check the logs and see what it's doing.

EnigmaVariation
01-18-2011, 03:10 AM
It seems to be a bit broken again.

It just ran its scheduled task and selected a user that did not meet the settings I had. I put that they had to have logged in within the last 7 days, this person hadn't logged in since October, and that they had to have posted within the last 14 days, and this person hadn't posted since May 2010.

Any ideas on how I can fix this?

DragonByte Tech
01-18-2011, 07:29 PM
It seems to be a bit broken again.

It just ran its scheduled task and selected a user that did not meet the settings I had. I put that they had to have logged in within the last 7 days, this person hadn't logged in since October, and that they had to have posted within the last 14 days, and this person hadn't posted since May 2010.

Any ideas on how I can fix this?

Sorry about that, I found a problem in the cron that selects the user. I fixed it in 1.6.3

Geek Specialtie
01-19-2011, 02:22 AM
I was having the same issue, showing a member that hasn't posted in over a year. I'll install the update.

Thanks for staying on top of and fixing issues quickly.

EnigmaVariation
01-19-2011, 03:10 AM
I installed the update and will report back if there is an issue. But I really appreciate how quickly you attend to everyone's questions/concerns. This has been one of my forum members' favorite things to look forward to each day - the changing of the spotlight. And what is nice is that as the admin, I don't even know who it is randomly going to select so that is fun for me too. Thanks for such a great mod and for keeping it up to date. :)

mjjboard
01-21-2011, 04:53 PM
I see you have the option to select what usergroups can view the spotlight box but what about an option for the admin to select what usergroups can be randomly selected? I ask that coz I am getting banned users come up and obviously I do not want a banned member in the spotlight.

haytham
01-21-2011, 05:22 PM
Hi,
I am running 3.8.6 and I have carried out installation instructions but I get nothing. I tried IE 8 and FF and same result. Look at the pic.

DragonByte Tech
01-21-2011, 07:19 PM
I see you have the option to select what usergroups can view the spotlight box but what about an option for the admin to select what usergroups can be randomly selected? I ask that coz I am getting banned users come up and obviously I do not want a banned member in the spotlight.

You are using a really old version. The newest version has the ability to select what groups to choose from.

DragonByte Tech
01-21-2011, 07:20 PM
Hi,
I am running 3.8.6 and I have carried out installation instructions but I get nothing. I tried IE 8 and FF and same result. Look at the pic.

What do you have in the settings area for the Member ID and is it a valid user? It looks like what I would expect if you had an invalid userid in there.

EnigmaVariation
01-21-2011, 08:53 PM
Everything is working great. :) I just had a question about the random member selection. Will it cycle through all of the members and not repeat anyone until it starts over again? Or is it truly random and some people could show up 3 times and others not at all? I have a member who has been in the spotlight twice now so I was wondering.

DragonByte Tech
01-21-2011, 09:37 PM
Everything is working great. :) I just had a question about the random member selection. Will it cycle through all of the members and not repeat anyone until it starts over again? Or is it truly random and some people could show up 3 times and others not at all? I have a member who has been in the spotlight twice now so I was wondering.

It selects all the users that fit the criteria in a random order. Then it cycles through the list and picks the first person that's a member of the allowed groups. So yes, someone could be selected a few times before someone gets picked once.

haytham
01-22-2011, 04:13 AM
What do you have in the settings area for the Member ID and is it a valid user? It looks like what I would expect if you had an invalid userid in there.

Hi. I left it as it is and my ID is 1.

mjjboard
01-24-2011, 11:32 AM
Thanks I updated, however now it appears like the cron never runs, due to the fact the user never changes.

I have even run the cron manually, and the user still does not change.

I have this set to daily:

When to run
Choose how often you want the scheduled task to run.

And I have not edited anything anywhere.

When I upgraded I chose overwrite in all incidences.

DragonByte Tech
01-24-2011, 04:52 PM
Thanks I updated, however now it appears like the cron never runs, due to the fact the user never changes.

I have even run the cron manually, and the user still does not change.

I have this set to daily:

When to run
Choose how often you want the scheduled task to run.

And I have not edited anything anywhere.

When I upgraded I chose overwrite in all incidences.

What does the scheduled task log for the spotlight say?

SamirDarji
03-23-2011, 04:29 AM
I like this plugin, but it's overkill for what I need. I can dissect the code and figure out how to make a query for this, but all I need is a sql query to give me a random user that's logged in say in the last week or month. Would it be possible to just give me that query?

Rickpwns
03-23-2011, 01:32 PM
Nice, Will try!

Dylanblitz
03-24-2011, 12:40 AM
I like this plugin, but it's overkill for what I need. I can dissect the code and figure out how to make a query for this, but all I need is a sql query to give me a random user that's logged in say in the last week or month. Would it be possible to just give me that query?

What info do you what? just the username? and which do you want, a week or a month.

SamirDarji
03-24-2011, 02:37 AM
What info do you what? just the username? and which do you want, a week or a month.Yep, just the random username of someone who was active within the week or month that the query is run in. I'm planning to make it into a cron job and just email me or somehow otherwise send me the name.

I want to use this to reward users for being online and logged in. I have a large number of users that visit my site, but don't log in.

Thank you so very much!

DragonByte Tech
03-24-2011, 03:47 AM
Yep, just the random username of someone who was active within the week or month that the query is run in. I'm planning to make it into a cron job and just email me or somehow otherwise send me the name.

I want to use this to reward users for being online and logged in. I have a large number of users that visit my site, but don't log in.

Thank you so very much!

Ah okay, easy enough. Just put this file into your includes/cron folder and create a scheduled task for it. It will send you an email with a random username for a user that's logged in the past week and one for the past month. Change the $to_email variable inside the file as well.

Dylan

SamirDarji
03-24-2011, 04:26 AM
Ah okay, easy enough. Just put this file into your includes/cron folder and create a scheduled task for it. It will send you an email with a random username for a user that's logged in the past week and one for the past month. Change the $to_email variable inside the file as well.

DylanOMG!!! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you!

Even though I'm not using the mod in this thread, I'm marking it as installed and nominating it for MOTM. :) It's the least I can do. :)

Should I schedule the cron for every day, or just every week/month?

DragonByte Tech
03-24-2011, 05:02 AM
OMG!!! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you!

Even though I'm not using the mod in this thread, I'm marking it as installed and nominating it for MOTM. :) It's the least I can do. :)

Should I schedule the cron for every day, or just every week/month?

For whenever you want. If you want an email weekly then just set it to run every week.

Dylan

SamirDarji
03-24-2011, 06:20 AM
Awesome! Thank you very much. I've run it a few times manually to see how it worked. Really sweet. :)

I was looking at the code and I noticed it's using 30 days for the month, which generally works, but I wanted to see if there was a way to get it to be precisely the number of days in a month. I found the date('t') function on php.net that seems like it will return the number of days in the current month which could be used to calculate the exact number of seconds in that month.

The only problem is that vb's cron doesn't have a setting to run at the end of the month. :( A quick google search came up with some exotic cron lines that I'm not familar with nor know how to implement. So the other option would be to execute the script in two different crons in vb, once for the end of the week, once for the first of the month, and if the script detects that it's running at the first of the month that's not the end of the week, subtract a day and then calculate the month via that time and determine the random user.

But the more I think about this, since the week or month would be executed separately in two different crons, maybe the script should just be croned to run daily and do its own end of week and end of month detection and execute accordingly. Then the cron variable is taken out of the picture.

So the whole body of the script could be two if statements. If today is last day of month, execute for last day of month and email. If today is last day of the week, excute for end of the week and email. If it doesn't fall into either loop, the cron will execute with no output. But looking at the structure of your cron, it's designed to execute both queries back to back from an array, so the main loop would change. Would it be too much to ask for this design change?

I've figured out that if(date('j') == date('t')) can be used to check eom and if(date('N') == 7)should be able to be used to check eow. But this research has taken me over an hour. :(

tommydamic68
04-02-2011, 09:57 AM
I have a problem as well, the user never changes.:mad:

here is my log:
16544 Dragonbyte-Tech: Spotlight - Pick Random User 07:04, 2nd Apr 2011 Not time to update spotlight userid yet
16375 Dragonbyte-Tech: Spotlight - Pick Random User 01:06, 1st Apr 2011 Not time to update spotlight userid yet
16368 Dragonbyte-Tech: Spotlight - Pick Random User 00:01, 1st Apr 2011 Not time to update spotlight userid yet
16361 Dragonbyte-Tech: Spotlight - Pick Random User 23:00, 31st Mar 2011 Not time to update spotlight userid yet
16354 Dragonbyte-Tech: Spotlight - Pick Random User 22:01, 31st Mar 2011 Not time to update spotlight userid yet
16347 Dragonbyte-Tech: Spotlight - Pick Random User 21:01, 31st Mar 2011 Not time to update spotlight userid yet
16340 Dragonbyte-Tech: Spotlight - Pick Random User 20:01, 31st Mar 2011 Not time to update spotlight userid yet
16337 Dragonbyte-Tech: Spotlight - Pick Random User 19:45, 31st Mar 2011 Not time to update spotlight userid yet
16332 Dragonbyte-Tech: Spotlight - Pick Random User 19:05, 31st Mar 2011 Not time to update spotlight userid yet
16325 Dragonbyte-Tech: Spotlight - Pick Random User 18:01, 31st Mar 2011 Not time to update spotlight userid yet
16318 Dragonbyte-Tech: Spotlight - Pick Random User 17:00, 31st Mar 2011 Not time to update spotlight userid yet
16311 Dragonbyte-Tech: Spotlight - Pick Random User 16:00, 31st Mar 2011 Not time to update spotlight userid yet
16304 Dragonbyte-Tech: Spotlight - Pick Random User 15:00, 31st Mar 2011 Not time to update spotlight userid yet
16297 Dragonbyte-Tech: Spotlight - Pick Random User 14:00, 31st Mar 2011 Not time to update spotlight userid yet
16290 Dragonbyte-Tech: Spotlight - Pick Random User 13:02, 31st Mar 2011 Not time to update spotlight userid yet

DragonByte Tech
04-04-2011, 09:05 AM
I have a problem as well, the user never changes.:mad:


How often is it set to update and when was the last time it was updated?
If you want to force it to start over login to the ACP and go to the settings area. On the spotlight settings set the Spotlight Next Cron Run field to 1. It will start with a new user that fits the criteria next time it checks to run.

ShawneyJ
08-25-2011, 12:22 AM
i have a problem where, when you click on the next page number it dont work the first click. ie: your on page "1" when you click page "2" in a thread or forum, i had to click on page number twice for the the page to display. this also effected usernames, click on a username and the URL in browser would change, but the page stays the same until you clicked twice. i disabled my hacks 1 by 1 and finally after disabling "this mod" my forum is back to normal, as in, you only have to click on a username or next page once now for it to direct rather than 2 times. hope this makes sense.
cheers.
testing on 3.8.4.

DragonByte Tech
08-25-2011, 06:43 AM
i have a problem where, when you click on the next page number it dont work the first click. ie: your on page "1" when you click page "2" in a thread or forum, i had to click on page number twice for the the page to display. this also effected usernames, click on a username and the URL in browser would change, but the page stays the same until you clicked twice. i disabled my hacks 1 by 1 and finally after disabling "this mod" my forum is back to normal, as in, you only have to click on a username or next page once now for it to direct rather than 2 times. hope this makes sense.
cheers.
testing on 3.8.4.

Do you mean it's doing this when viewing a thread? The mod should only be showing and affecting anything on the forum homepage.

Dylan

ShawneyJ
08-26-2011, 01:30 AM
Do you mean it's doing this when viewing a thread? The mod should only be showing and affecting anything on the forum homepage.

Dylan

hi mate,

i actually changed DBTech: Spotlight - Show Random User to "global_start" to show on all pages and put the code in my sidebar. maybe thats where i went wrong.
sorry for not explaining fully.

DragonByte Tech
08-26-2011, 04:51 PM
hi mate,

i actually changed DBTech: Spotlight - Show Random User to "global_start" to show on all pages and put the code in my sidebar. maybe thats where i went wrong.
sorry for not explaining fully.

Yes, it was only designed to run on the forum home for vB3. Changing the hook probably make it act like it is.

Goomzee
04-03-2012, 11:38 AM
could i show user spotlight on my home page?

CoffeeLovesYou
04-04-2012, 07:55 PM
Does this work with vBAdvanced?

Goomzee
04-05-2012, 04:40 AM
could i show user spotlight on my home page?

Does this work with vBAdvanced?


i also want to know this?

DragonByte Tech
04-05-2012, 07:45 AM
could i show user spotlight on my home page?

Does this work with vBAdvanced?

Sorry, it's only a forumhome mod currently. We'll probably expand it to a CMS widget and add it to vBAdvanced next version, that's not scheduled to be worked on at the moment though.

Dylan

aciurczak
01-19-2013, 03:39 PM
I have a question about two parameters in the control panel: Minimum Days, Minimum Days since Last Post

It seems that these are actually behaving as a Maximum, not a Minimum, right? I had 14 in there for both (default), and it chose a user that has logged in today and posted yesterday. If it were going by minimum 14 days, it would have chosen a user that has *not* logged in, in at least 14 days, right?

DragonByte Tech
02-13-2013, 07:31 AM
I have a question about two parameters in the control panel: Minimum Days, Minimum Days since Last Post

It seems that these are actually behaving as a Maximum, not a Minimum, right? I had 14 in there for both (default), and it chose a user that has logged in today and posted yesterday. If it were going by minimum 14 days, it would have chosen a user that has *not* logged in, in at least 14 days, right?

Correct, sorry, I'll change the wording on that. It is the maximum time since a user has logged in/posted. So if you set them to 14, then it will only show users who have logged in or posted in the last 14 days.

Dylan

DragonByte Tech
04-05-2013, 11:33 PM
Updated to v1.6.6

Feature: Can now specify userid's not selectable
Fix: Phrased all cron and vbsetting text