PDA

View Full Version : Miscellaneous Hacks - Module CMPS: Latest and Random Public Social Groups


goblues
12-29-2007, 10:00 PM
Adds a Module which shows the last 5 public Social Groups Created

Added a module which randomly displays Groups.
Use latestsocialgroups to display the most recently created or use randomsocialgroups to display 5 random groups.
See screenshot for details

Dependencies:
VbA CMPS (http://www.vbadvanced.com/products.php?do=productinfo&productid=4)


How to install

Admincp => vBa CMPS => Download / Upload Module
Click [Browse]
Browse for the file "latestsocialgroups.module" or randomsocialgroups.module
2-26-2008 - Added XML files as an alternative to install.
Submit
Select pages and locations

To restrict to a specific category find in your modules folder either vba_groups.php for latest or vba_randgroups.php for random:

FROM " . TABLE_PREFIX . "socialgroup WHERE type = 'public'

and replace with:

FROM " . TABLE_PREFIX . "socialgroup WHERE type = 'public' AND socialgroupcategoryid = '2'

Where socilagroupcategoryid is the category id of the category you wish to show.

Tested on Vb 3.8.3
VbAdvanced CMPS v3.2

Please Click Installed if you use this.

acegames
12-30-2007, 09:41 PM
First install , thankyou :)

goblues
12-30-2007, 09:47 PM
You are welcome!

Networknutz
12-31-2007, 05:03 AM
installed works great!

goblues
12-31-2007, 11:53 AM
I added to the first post a Random Module in addition to the Latest Module. Enjoy!

abroad
01-01-2008, 10:55 AM
Installed it and the modules are shown on my portal BUT

it doesnt show any group. Only if I click on "Show all GRoups"

What is wrong?:confused:

goblues
01-01-2008, 11:05 AM
These modules only pull "Public" groups. If the only groups you have created are invite only, they will not show.

EDIT: Now that I said above I got to looking at the code and realized that statement wasn't true. Updated the Zips to make it true.

abroad
01-01-2008, 11:15 AM
My groups are public...

goblues
01-01-2008, 11:22 AM
Redownload the module and allow overwrite and see if that helps. If it does not, PM your site with login details and I will have a look if you want.

abroad
01-02-2008, 05:17 AM
overwrote it and now it works well! Thanks!

abroad
01-02-2008, 06:33 AM
Actually it worked. When I checked it again I got this message:

Unable to add cookies, header already sent.
File: ml/forum/modules/vba_randgroups.php
Line: 18

Now I reinstalled it and it works again...but I am afraid that I will get the error message above again...

360junkie
01-02-2008, 06:48 AM
Hope to install soon

goblues
01-02-2008, 10:38 AM
Let me know if it pops up again and don't forget to click install.Actually it worked. When I checked it again I got this message:

Unable to add cookies, header already sent.
File: ml/forum/modules/vba_randgroups.php
Line: 18

Now I reinstalled it and it works again...but I am afraid that I will get the error message above again...

forumrunt
01-02-2008, 04:23 PM
nice idea

abroad
01-03-2008, 09:12 AM
tried it again. And I get again

Unable to add cookies, header already sent.
File: /home/www/web99/html/forum/modules/vba_randgroups.php
Line: 18

This happens when I log out and click on "Go to Forums Index".

wattieuk
01-03-2008, 12:39 PM
As soon as it was installed, my front page wouldnt load. When I removed it, it was ok again. Weird.

zmmmzz
01-03-2008, 01:07 PM
thaaaaaaaanks!!!!

goblues
01-03-2008, 09:43 PM
Try this wattieuk:

Admin CP => vBa CMPS => Default Settings => Main Options => Process PHP File Modules Within A Function

wattieuk
01-05-2008, 11:55 AM
Try this wattieuk:

Admin CP => vBa CMPS => Default Settings => Main Options => Process PHP File Modules Within A Function
Thanks for the reply but it's already turned on.

goblues
01-05-2008, 12:16 PM
See post below.

goblues
01-05-2008, 12:20 PM
See update in Blue in first post. For some reason, some modules are adding spaces after the closing ?> tag in the php files in your forum/modules folder. This fix seems to work with any modules that you may have installed.

sinistergaming
01-08-2008, 01:25 AM
thanks

Alfa1
01-09-2008, 09:56 PM
How about a 'latest group comments' function?

goblues
01-09-2008, 11:06 PM
Sounds easy enough (Famous Last Words). Give me until the weekend and I will Have this ready if possible. Please click install for this one if you use it. Thanks!

Alfa1
01-10-2008, 01:58 AM
That would be awesome.

Alfa1
01-10-2008, 11:21 PM
I am getting this error:
Unable to add cookies, header already sent.
File: /home/myforum/domains/my-forum.com/public_html/forum/modules/vba_groups.php
Line: 20
I can't find line 20.

goblues
01-11-2008, 12:34 AM
Exactly. Thats why you need to do the file edit in blue in the first post, or overwrite the vba_groups.php file with the one in the first post. Again, for some reason, the export is adding spaces after the ?> tag. If you put you cursor at the end of that and hit delete to delete the empty spaces, all will be fine.

goblues
01-12-2008, 11:00 AM
The zip files have been updated. There shouldn't be any more issues with headers being sent and cookies anymore.

Alfa1
01-12-2008, 01:43 PM
That fixed it. Thanks for the swift update! Its looking good.
I hope it works out with the latest comments feature.

ricoche
01-13-2008, 07:38 AM
I'm getting this error with vbulletin 3.7.0 beta 3 and vbCMPS v3.0 RC2

Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /admincp/vba_cmps_admin.php on line 3375

The file you have uploaded is not a valid module file.

Not sure what that's all about. Thanks.

Jim

goblues
01-13-2008, 11:10 AM
Zip files have been updated. Sorry :(

ricoche
01-13-2008, 12:31 PM
Thanks! Works great now.

goblues
01-13-2008, 12:49 PM
You are welcome.

:Judge:
02-03-2008, 04:45 AM
Installed without any troubles. vB 3.7.0 Beta 4 and vBA 3.0 RC2

Thanks!

gertoo
02-23-2008, 06:43 PM
Blank index page

goblues
02-23-2008, 09:17 PM
What is your site url? PM if you don't want it public

romanticyao
02-25-2008, 08:08 AM
installed but not showing any public groups... same problem. I downloaded the lastest zip

DawnsWebDesigns
02-25-2008, 09:56 PM
I had to uninstall then reinstall to get them to show up. But then it caused a bunch of errors so I had to take it back off again. Around 40 of them out of about 60 were from this one mod. :(

goblues
02-25-2008, 10:54 PM
So you had 20 more errors? What were you doing, upgrading vbadvanced?

romanticyao
02-26-2008, 12:07 AM
I m using vb3.7 beta5 and vba 3.0 gold... downloaded the lastest zip from the first post and installed, showing nothin...

goblues
02-26-2008, 12:53 AM
I m using vb3.7 beta5 and vba 3.0 gold... downloaded the lastest zip from the first post and installed, showing nothin...
Try the XML instead attached to this post and report back.

romanticyao
02-26-2008, 06:06 AM
hi, this one works! so wut was the problem? hope you could update the xml file in zip package or release a newer version? once I put my site live from testing server I could install it without this xml "patch" file.

goblues
02-26-2008, 10:17 AM
I am not sure what the problem is. I changed nothing but downloaded the module via XML instead of .module. The files are exactly the same, my guess there may be something goofy with vbadvanced gold.

romanticyao
02-26-2008, 05:44 PM
some ppl installed and it worked without problem, it might caused by different php version?

Dilldogs
04-07-2008, 09:59 PM
I installed it on VB 3.7 bata 6 and it works fine. But when I install on 3.7 RC 2 not working.

Only thing different That is bata 6 and RC 2. So I am stumped...lol

goblues
04-07-2008, 10:18 PM
I just installed the random XML module on a vanilla RC1 board no problems. I have not installed RC2 yet so I am not sure what has changed. Did you install the .module file or the XML?

crkgb
04-09-2008, 08:44 AM
My group is publick with 3 members at this time and the module is empty. It only states - View All Groups

setishock
04-09-2008, 11:44 PM
That spices up my cmps. May be get those lurkers to sign up. Thanks
I used the modules out of the zip files and it worked correctly the first time.
Using VB 3.7 beta 5 and vBadvanced's 3.0 gold cmps.

crkgb
04-10-2008, 01:13 AM
RC2 vBa 3.0 - Not Showing up the groups... (((

goblues
04-11-2008, 12:24 AM
I will take a look. By the way, did you install this module using the .module file or upload the XML in vbadvanced?

crkgb
04-11-2008, 02:31 AM
Both actually. And after updating to RC3 still a no show.

tormodg
04-16-2008, 08:55 AM
Installed on vB 3.7 RC1, vBa 3.0.0, works like a charm. Easy to customize! Thanks for this hack.

IrPr
05-02-2008, 08:55 PM
Nice work
what about group messages?

goblues
05-02-2008, 11:05 PM
What exactly would you like to see with group messages? Count or the actual messages?

edenx
05-03-2008, 01:23 AM
could you add a group icon, based on any picture uploaded to the group?

IrPr
05-03-2008, 06:16 AM
What exactly would you like to see with group messages? Count or the actual messages?
Sorry for bad explain, I mean another block for recent group messages

BTW again thanks for this mod, i modified php module n template to show group owner
screenie added

carphead
05-14-2008, 07:54 PM
### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO vbadv_modules
(`0`, `active`, `userperms`)
VALUES
('', '1', '6');


On a 3.6.8 Upgraded to 3.7 with VBa 3.0.1 installed. On a completely fresh 3.7 with Vba installed it works. Any ideas why?

MrEyes
05-29-2008, 11:08 AM
Great plugin, installed

goblues
05-29-2008, 10:59 PM
### INSERT QUERY GENERATED BY fetch_query_sql() ###
INSERT INTO vbadv_modules
(`0`, `active`, `userperms`)
VALUES
('', '1', '6');


On a 3.6.8 Upgraded to 3.7 with VBa 3.0.1 installed. On a completely fresh 3.7 with Vba installed it works. Any ideas why?

There has been better luck using the XML for install, did you try that?

Great plugin, installed

Thank you ;)

mikkitine
06-13-2008, 01:21 AM
How do I install the .xml file?

goblues
06-14-2008, 11:07 AM
Same way as you would a .module file. See and read screenshot which was taken from ADMINCP->Vba CMPS->Download/Upload Module

S7rik3R
06-14-2008, 01:22 PM
Good Work !
Installed

mikkitine
06-14-2008, 04:40 PM
Same way as you would a .module file. See and read screenshot which was taken from ADMINCP->Vba CMPS->Download/Upload Module
Thanks. Very good stuff.

UltraFanatics
06-14-2008, 05:02 PM
AWESOME!

Do you have anymore?

goblues
06-15-2008, 01:08 AM
Like what? :)

buckethead
06-15-2008, 02:26 AM
Good job!
INSTALLED

UltraFanatics
06-15-2008, 08:19 AM
Anything really lol

Wouldn't mind something for the facebook type status mod

goblues
06-15-2008, 01:05 PM
Could you point me to the hack?

UltraFanatics
06-17-2008, 06:17 PM
Sure here you go mate
https://vborg.vbsupport.ru/showthread.php?t=181283

pmkb
07-28-2008, 12:15 PM
Is it possible to adapt this module to list the groups with the most recent posts like the "Available Groups" section of the social groups page?

pmkb
07-28-2008, 03:02 PM
Thanks for this module. I was able to adapt the code (see attached) to show the groups with most recent posts. :)

Coop1979
08-06-2008, 01:49 PM
What is the raw PHP code for showing the latest groups? I'm trying to insert it into a block in Drupal.

GrendelKhan{TSU
08-07-2008, 01:24 AM
thanks. works fine.

REQ:
would love to see comments updates as well. :)

tintin74
11-08-2008, 07:35 AM
I'm running vbulletin 3.7.3 with cmps 2.0 and Vbseo Gold . I've install this module without any problem.

Now, I've into the latest social group box on cmps page every urls not S.E. friendly. But, into social page index I've every link search engine friendly.

This could generate a duplicate content indexing in Google.

Does anyone could help me to change urls in "Latest Social Group" box ?

Thank you Tintin

tormodg
11-10-2008, 01:13 PM
As long as the urls are rewritten before the page is loaded you should be fine (ie, you're not serving two similar pages with different URLs).

jacobi
01-19-2009, 01:40 AM
Great mod - working with vBulletin 3.8.0 and vBadvanced CMPS v3.1.0.

BWJ
01-22-2009, 05:11 PM
Does any one know how to restrict this mod to one specific social group category? (instead of all social group categories)

jl255
01-23-2009, 12:56 AM
thank you for this, but cld it be modified to show the group image and name? this shld make the module much more attractive (IMHO). And of course, the ability to determine how many rows and columns of images to show. think it will look great ;)

goblues
01-24-2009, 01:09 AM
It is has been a long time since I released this mod, but I will take a look to see if I can get this to your liking BWJ and jl255

jl255
01-24-2009, 01:50 AM
tks will be looking forward to it!

BWJ
01-26-2009, 09:29 PM
It is has been a long time since I released this mod, but I will take a look to see if I can get this to your liking BWJ and jl255

Thank you very much. That would really be great and appreciated :)

trotskid
03-08-2009, 02:32 AM
I would like to show just an especific number of groups, where exactly can I modify this?

PS: Thanks for this hack ;)

Arkham
04-15-2009, 05:07 PM
Does any one know how to restrict this mod to one specific social group category? (instead of all social group categories)

That option is what brought me to this mod. I need something like that, to be able to select the category(ies) to choose from.

Good looking mod so far though!

Brandon Sheley
07-07-2009, 11:07 PM
Wish this worked :(
groups can be seen by guest, I can navigate to the group as a guest, but the modual doesn't show anything but "View All Groups"

goblues
07-07-2009, 11:16 PM
Wish this worked :(
groups can be seen by guest, I can navigate to the group as a guest, but the modual doesn't show anything but "View All Groups"

Didn't know that it didn't ;). I haven't played with this in some time now. Everyone, What are we looking at doing with this mod now? PLease create a wish list and I will see what I can do.

Brandon Sheley
07-07-2009, 11:20 PM
Didn't know that it didn't ;). I haven't played with this in some time now. Everyone, What are we looking at doing with this mod now? PLease create a wish list and I will see what I can do.

I just need it to work like described in the first post ;)

ps.. I tried the .modal and the .xml and got the same results :(

goblues
07-07-2009, 11:51 PM
I just need it to work like described in the first post ;)

ps.. I tried the .modal and the .xml and got the same results :(


Just installed "latest" and "random" (XML's) on a vanilla 3.8.3 test site and works as designed. Please take note that moderated or invite only groups will not show for this module. Only Public groups will show (as stated in the first post). However can be easily modified if you need, just let me know.

goblues
07-08-2009, 12:19 AM
Does any one know how to restrict this mod to one specific social group category? (instead of all social group categories)

To restrict to a specific category find in your modules folder either vba_groups.php for latest or vba_randgroups.php for random:

FROM " . TABLE_PREFIX . "socialgroup WHERE type = 'public'

and replace with:

FROM " . TABLE_PREFIX . "socialgroup WHERE type = 'public' AND socialgroupcategoryid = '2'

Where socilagroupcategoryod is the category id of the group you wish to show.

Mattius
07-28-2009, 11:05 AM
Just installed "latest" and "random" (XML's) on a vanilla 3.8.3 test site and works as designed. Please take note that moderated or invite only groups will not show for this module. Only Public groups will show (as stated in the first post). However can be easily modified if you need, just let me know.

Id like to be able to show moderated groups. How can I alter the SQL? Im not sure how to do "not equal to"...is it != or <>, I get an sql error either way.

goblues
07-30-2009, 11:14 PM
Going off of memory right now, Not at a computer where I can look at code, I believe by changing the WHERE type = to moderated or inviteonly depending on what you want to display. to display all, I think you can just get delete WHERE type = 'public'

Let me know if this helps

AND PLEASE MARK INSTALLED

peterle1
08-14-2009, 11:11 PM
Why do you have that many errors in your templates?

Here are two corrected ones in german language:

adv_portal_groups

<tr>
<td class="$bgclass">
$showgroupsbit<br />
<i><a href="$vboptions[bburl]/group.php?do=grouplist">alle Interessengemeinschaften</a></i>
</td>
</tr>


adv_portal_groups_bit

<div style="padding-top: 1px; padding-bottom: 1px" class="smallfont">
• <a href="$vboptions[bburl]/group.php?groupid=$showgroup[groupid]"><b>$showgroup[name]</b></a>
<br />
Miglieder - $showgroup[members]<br />
Bilder - $showgroup[picturecount]
</div>
<br />


w3c validator missed some " and the end tag for i had to be /i

goblues
08-14-2009, 11:25 PM
Why do you have that many errors in your templates?


Because you are smarter than me ;)

Thanks!

peterle1
08-15-2009, 09:27 PM
Sorry for the hard words, but I was very tired the time I wrote it.
Thanks for your mod, it was a great help. :)

ahmedipa
01-04-2010, 05:54 AM
good

viper357
06-20-2011, 12:12 PM
Thanks, working fine on vb 3.8.5 and vbA CMPS 3.2.1