vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced Dynamics > vBa Dynamics v1.0 Support > Addon Modules & Modifications > Add-On Modules

Reply
 
Thread Tools Display Modes
  #1  
Old 03-07-2008, 11:47 AM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default CMPS Module - New/Random Entries (updated for v1.0.0)

Here's a simple module that will allow you to show new or random entries on your CMPS. It's about the same as the moudle that comes with vBa Dynamics, but modified a bit to work with the CMPS.


To install the module, first download both attachments below.

Now, go to the 'Download Upload Plugins' link in your Admin CP. Note that if you have installed a previous version of this module, you will need to delete the following plugins before proceeding:
vBa Dynamics CMPS Module (globalize $vba_dyna class)
vBa Dynamics CMPS Module (load $vba_dyna class)
vBa Dynamics CMPS Module (Special Templates)

Upload the 'plugins_cmps_dynamics_module.xml' file that you just downloaded from this thread.

Now, click on the 'Download / Upload Moudule' link under the 'vBa CMPS' group, and upload the 'whatsnew.module' in the place provided there. When you see a message asking if you would like to overwrite the templates, be sure that 'No' is choosen and continue.

Now click on the 'Default Settings' link under the vBa CMPS group and add 'vba_dyna' (without the quotes) to the 'Portal Output Global Variables' setting.

Last, activate the module on any of your CMPS pages that you wish it to appear on, and modify any of the new settings for the module to your liking.


Multiple Instances
For those who would like to run this with multiple instances, or with a secondary instance, please note that you will need to add an additional plugin to the 'init_startup' hook location with the following code:
Code:
if (defined('VBA_PORTAL'))
{
	$datastore_fetch[] = "'adv_dyna_rand'";
	$datastore_fetch[] = "'adv_dyna_cats'";
	$datastore_fetch[] = "'adv_dyna_perms'";
	$datastore_fetch[] = "'adv_dyna_opts'";
	$datastore_fetch[] = "'adv_dyna_attach'";

	$phrasegroups[] = 'adv_dyna';
}
Replace each red instance of 'adv_dyna' there with the prefix you are using for that instance of vBa Dynamics. Then edit the settings for this module and enter the same instance prefix in the 'Dynamics Instance Prefix' setting.

Also note that after uploading or copying the module for your secondary instance(s), you will need to edit the 'Templates Used' setting for the new module and replace anywhere you see 'adv_dyna' in the template names listed there with the instance prefix you are using. So for example, if you are using 'reviews' for your instance prefix, you would need to change a template named 'adv_dyna_entrybit' to 'reviews_entrybit'.

Those using vBa Dynamics v1.0.2 or earlier, be sure to download the whatsnew_old.module file below. Those running v1.0.3+ will need to download the whatsnew_1_0_3.module file.
Attached Files
File Type: xml plugins_cmps_dynamics_module.xml (1.4 KB, 264 views)
File Type: module whatsnew_1_0_3.module (55.8 KB, 148 views)
File Type: module whatsnew_old.module (55.8 KB, 27 views)

Last edited by Brian; 02-10-2009 at 12:50 PM.
Reply With Quote
  #2  
Old 03-07-2008, 12:00 PM
KW802's Avatar
KW802 KW802 is offline
Administrator
 
Join Date: Mar 2004
Location: A galaxy far, far away...
Posts: 5,030
Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)



Any ideas on how many queries it'll add to CMPS or is it all cache based?
Reply With Quote
  #3  
Old 03-10-2008, 06:17 AM
tintin74 tintin74 is offline
Member
 
Join Date: Oct 2007
Posts: 74
Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

Is this module compatible with multiple vbadvanced instance?

Could I display this module (duplicated) for every vbadvanced istance into 1 page?

Thank you
Reply With Quote
  #4  
Old 03-11-2008, 12:26 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

Kevin - It should perform 2 queries. 1 to get the cache, and 1 to get the entries.

tintin74 - Yes, it should work with multiple instances. I've just updated the first post to include further instructions for that.
Reply With Quote
  #5  
Old 03-11-2008, 04:06 PM
neverstop's Avatar
neverstop neverstop is offline
Senior Member
 
Join Date: Jan 2007
Posts: 209
Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

Does this support attachment thumbs now?
Reply With Quote
  #6  
Old 03-11-2008, 04:39 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

Yes, there is an option to enable displaying the first attachment.
Reply With Quote
  #7  
Old 03-11-2008, 05:14 PM
neverstop's Avatar
neverstop neverstop is offline
Senior Member
 
Join Date: Jan 2007
Posts: 209
Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

Gah... even when it was checked "no" it overwrote all my templates.
Reply With Quote
  #8  
Old 03-11-2008, 05:30 PM
neverstop's Avatar
neverstop neverstop is offline
Senior Member
 
Join Date: Jan 2007
Posts: 209
Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

Also, I see no option for the attachment thumbs in the ACP... could this because I had the old version installed?
Reply With Quote
  #9  
Old 03-12-2008, 12:11 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

Did you make sure to upload the new .module file attached to the first post?
Reply With Quote
  #10  
Old 03-12-2008, 12:30 PM
neverstop's Avatar
neverstop neverstop is offline
Senior Member
 
Join Date: Jan 2007
Posts: 209
Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

Yup...

I just tried it again after realizing I still had the older version of the module there as well just to be sure.

I deleted both modules, and redownloaded the .module file to be sure.

Again it overwrote the templates even when set to "no". (could this be because of multi instance? I saw three of each template in the list when uploading the module)

And there is still no option in the admin cp for adding the attachment (no checkbox in the Entrybit Elements, and no option anywhere else).

Cheers
Reply With Quote
  #11  
Old 03-14-2008, 08:41 PM
Classico Classico is offline
Member
 
Join Date: Dec 2007
Posts: 47
Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

Quote:
Originally Posted by neverstop View Post
Yup...

I just tried it again after realizing I still had the older version of the module there as well just to be sure.

I deleted both modules, and redownloaded the .module file to be sure.

Again it overwrote the templates even when set to "no". (could this be because of multi instance? I saw three of each template in the list when uploading the module)

And there is still no option in the admin cp for adding the attachment (no checkbox in the Entrybit Elements, and no option anywhere else).

Cheers
I have the same problem here.
Reply With Quote
  #12  
Old 03-18-2008, 07:52 PM
Classico Classico is offline
Member
 
Join Date: Dec 2007
Posts: 47
Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

Quote:
Originally Posted by neverstop View Post
And there is still no option in the admin cp for adding the attachment (no checkbox in the Entrybit Elements, and no option anywhere else).
has anybody solve this? Can anybidy see the attachment thumbs?

Thanks
Reply With Quote
  #13  
Old 03-31-2008, 06:00 AM
tfw2005 tfw2005 is offline
Senior Member
 
Join Date: Aug 2004
Posts: 352
Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

Quote:
Originally Posted by Classico View Post
has anybody solve this? Can anybidy see the attachment thumbs?

Thanks
Brian, need this as well. I thought it was part of this release, so I didn't think twice about installing Dynamics as my news system on the new license. I know you hacked up a version before, and see that work in the new files, but the setting isn't there, and when I import the hacked version of the other module to the new site, get an error code (for each, 663 in dyna_class, which is attachment call).

So, any way to get this worked out ASAP? At this point, just waiting on that to go live, all other editing and importing done here on new license.

Thanks!
Reply With Quote
  #14  
Old 03-12-2008, 04:39 PM
tintin74 tintin74 is offline
Member
 
Join Date: Oct 2007
Posts: 74
Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

Quote:
Originally Posted by Brian View Post


Multiple Instances
For those who would like to run this with multiple instances, or with a secondary instance, please note that you will need to add an additional plugin to the 'init_startup' hook location with the following code:
Code:
if (defined('VBA_PORTAL'))
{
	$datastore_fetch[] = "'adv_dyna_rand'";
	$datastore_fetch[] = "'adv_dyna_cats'";
	$datastore_fetch[] = "adv_dyna_perms'";
	$datastore_fetch[] = "adv_dyna_opts'";
	$datastore_fetch[] = "adv_dyna_attach'";

	$phrasegroups[] = 'adv_dyna';
}
Replace each red instance of 'adv_dyna' there with the prefix you are using for that instance of vBa Dynamics. Then edit the settings for this module and enter the same instance prefix in the 'Dynamics Instance Prefix' setting.
Brian , adding this plugin , it solve these issues:

Code:
Warning: Invalid argument supplied for foreach() in /includes/vba_dyna_class.php on line 602

Warning: Invalid argument supplied for foreach() in /includes/vba_dyna_functions.php on line 250
Thank you.

But it didn't solve the problem regarding the url.

Creating 1 cmps page, adding this module for 1 dynamics istance and duplicate the same module for another dynamics istance (changing for this adv_dyna into adv_2ist), I still have the first module right url entry but the second module has wrong url.

Example:

First module istance entry url:

http://www.mydomain.com/first-istanc...e-entry-1.html


Second module istance entry url:

http://www.mydomain.com/first-istanc...-entry-34.html

As you can see , the system get the right entries from distinct istances but the second url has still /first-istance/ before the entry name.

Hope you can solve this problem, please. I think there is a conflict between the duplication of this module. If I inactive one of this module, the active one works well.

Thank you


Something else:

If I invert the order of the modules into the page, I get now this urls:

First module istance entry url:

http://www.mydomain.com/second-istan...e-entry-1.html


Second module istance entry url:

http://www.mydomain.com/second-istan...-entry-34.html

Last edited by tintin74; 03-12-2008 at 04:50 PM.
Reply With Quote
  #15  
Old 03-13-2008, 11:20 AM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

I can't seem to reproduce any problems with running the module with multiple instances, but if you'd like to submit a support ticket via the Members' Area here I'll be glad to take a look at things for you.
Reply With Quote
  #16  
Old 03-17-2008, 02:25 AM
juinjuin juinjuin is offline
Junior Member
 
Join Date: Apr 2007
Location: Singapore
Posts: 20
Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

Hi

Will this work with CMPS v2.2.1 (vB 3.6)?

I have tried and it doesn't seem to work. After importing, the module appears in Edit Modules page but without a name. Without a name, I cannot click on it to edit. Only the arrows appear.

Thanks
Reply With Quote
  #17  
Old 03-17-2008, 12:28 PM
Brian's Avatar
Brian Brian is offline
Administrator
 
Join Date: Jan 2004
Location: Georgia, USA
Posts: 34,240
Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

No, the module will not work on versions prior to 3.0 RC1.

If the module's title somehow did not get inserted then you can hold your mouse over one of the arrows and check your browser's status bar to find the 'modid'. Then you can go to this link to edit the module:
admincp/vba_cmps_admin.php?do=editmodule&modid=X
Reply With Quote
  #18  
Old 03-18-2008, 12:12 PM
juinjuin juinjuin is offline
Junior Member
 
Join Date: Apr 2007
Location: Singapore
Posts: 20
Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

Hi

I did try that, and managed to get to the Edit Module page, but when i try saving after giving it a name, I get the following error:

Could not find phrase 'adv_portal_must_choose__include'

Incidentally, the phrase 'adv_portal_must_choose_include' with 1 underscore exists, so I duplicated it and name it 'adv_portal_must_choose__include. Still getting the same error.

I was thinking, even if I managed to update the module name, will it work? Currently, without the name, it doesn't appear in any page I add it to, so my guess is it won't appear even with a name.

Also, I looked into the whatsnew.module file and noticed a reference to dyna_newrand_cmps.php, which I cannot find anywhere.

..shoud I give up?

Thanks for the help


Quote:
Originally Posted by Brian View Post
No, the module will not work on versions prior to 3.0 RC1.

If the module's title somehow did not get inserted then you can hold your mouse over one of the arrows and check your browser's status bar to find the 'modid'. Then you can go to this link to edit the module:
admincp/vba_cmps_admin.php?do=editmodule&modid=X
Reply With Quote
  #19  
Old 03-31-2008, 04:31 AM
tfw2005 tfw2005 is offline
Senior Member
 
Join Date: Aug 2004
Posts: 352
Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

Just for reference, installed this on my second license site, and chose NO for overwriting templates, still did. Had a very customized entrybit_expanded template that I need to do over.
Reply With Quote
  #20  
Old 03-31-2008, 04:54 AM
juinjuin juinjuin is offline
Junior Member
 
Join Date: Apr 2007
Location: Singapore
Posts: 20
Exclamation Re: CMPS Module - New/Random Entries (updated for v1.0.0)

Yeah it is always overriding even if you choose no. Really troublesome to redo all those template edits. Second time round, I was a bit smarter and backed up all affected templates before importing.

Quote:
Originally Posted by tfw2005 View Post
Just for reference, installed this on my second license site, and chose NO for overwriting templates, still did. Had a very customized entrybit_expanded template that I need to do over.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
CMPS Module New Entries problem kirkus-tat Troubleshooting & Problems 7 02-12-2008 11:44 PM
Random entries module attroll Feedback & Suggestions 3 08-03-2007 03:13 AM


All times are GMT -4. The time now is 05:17 PM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.