Page 1 of 7 1234 ... LastLast
Results 1 to 20 of 136

Thread: CMPS Module - New/Random Entries (updated for v1.0.0)

  1. #1
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    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.
    Last edited by Brian; 02-10-2009 at 01:50 PM.

  2. #2
    Join Date
    Mar 2004
    Location
    A galaxy far, far away...
    Posts
    6,609

    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?

  3. #3

    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

  4. #4
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    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.

  5. #5
    Join Date
    Jan 2007
    Posts
    209

    Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

    Does this support attachment thumbs now?

  6. #6
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    Default Re: CMPS Module - New/Random Entries (updated for v1.0.0)

    Yes, there is an option to enable displaying the first attachment.

  7. #7
    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.

  8. #8
    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?

  9. #9
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    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?

  10. #10
    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

  11. #11

    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 05:50 PM.

  12. #12
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    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.

  13. #13

    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.

  14. #14
    Join Date
    Apr 2007
    Location
    Singapore
    Posts
    18

    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

  15. #15
    Join Date
    Jan 2004
    Location
    Georgia, USA
    Posts
    34,466

    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

  16. #16
    Join Date
    Apr 2007
    Location
    Singapore
    Posts
    18

    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

  17. #17

    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

  18. #18
    Join Date
    Aug 2004
    Posts
    353

    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.

  19. #19
    Join Date
    Apr 2007
    Location
    Singapore
    Posts
    18

    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.

  20. #20
    Join Date
    Aug 2004
    Posts
    353

    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!

Page 1 of 7 1234 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. CMPS Module New Entries problem
    By kirkus-tat in forum Troubleshooting & Problems
    Replies: 7
    Last Post: 02-13-2008, 12:44 AM
  2. Random entries module
    By attroll in forum Feedback & Suggestions
    Replies: 3
    Last Post: 08-03-2007, 04:13 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •