Page 3 of 4 FirstFirst 1234 LastLast
Results 41 to 60 of 63

Thread: How to create your own custom modules (CMPS 2.0 RC2)

  1. #41
    Join Date
    Oct 2005
    Location
    Manassas, Virginia
    Posts
    139

    Default Re: How to create your own custom modules (CMPS 2.0 RC2)

    You don't need to create a php module for this. Add the javascript to a template module, then add it to the page you want. I've attached an example. You can upload this module to your site by going to your Admincp and in the vBa CMPS menu => Download/Upload Modules. In the Upload section, browse for the module file where you saved it on your computer. Set the module as active. Choose which template this module should be applied to. Set the appropriate permissions. and click submit.

  2. #42
    Join Date
    Jun 2008
    Posts
    8

    Default Re: How to create your own custom modules (CMPS 2.0 RC2)

    Ok with your sample it works great
    In the future I will use it, to create my boxes

  3. #43
    Join Date
    Jun 2008
    Posts
    8

    Default Re: How to create your own custom modules (CMPS 2.0 RC2)

    Hm how do you create the .module file?
    If i create it, there is an error, that it isn´t a .module file, but it is xD

  4. #44
    Join Date
    Oct 2005
    Location
    Manassas, Virginia
    Posts
    139

    Default Re: How to create your own custom modules (CMPS 2.0 RC2)

    Quote Originally Posted by SecurityDog View Post
    Hm how do you create the .module file?
    If i create it, there is an error, that it isn´t a .module file, but it is xD
    1. Open AdminCP
    2. Goto vBa CMPS => Download / Upload Module
    3. Scroll down to Download Module section
    4. Choose ".module" as the Download File Type on the left
    5. Select the module you want to download from the list on the right
    6. Click Download

  5. #45
    Join Date
    May 2008
    Posts
    6

    Default Re: How to create your own custom modules (CMPS 2.0 RC2)

    Hi,

    How can I add options for my module ? For example if I edit a page I can choose some options for the news module.

  6. #46
    Join Date
    Oct 2005
    Location
    Manassas, Virginia
    Posts
    139

    Default Re: How to create your own custom modules (CMPS 2.0 RC2)

    Please provide more information so that we understand what you want to do.

    Thanks,
    Jim

  7. #47
    Join Date
    May 2008
    Posts
    6

    Default Re: How to create your own custom modules (CMPS 2.0 RC2)

    Ok,

    When I click on the link "Edit Pages" of the vBa CMPS menu. And then select a page to edit, at the bottom there's a lot of options group for each module (News, latest threads, etc.). I created a module and I want to created an option group for my module.

    Here's a screenshot :



    Sorry my english isn't very good, I hope you understood what I mean.
    Last edited by Yoteco; 06-10-2008 at 09:00 AM.

  8. #48
    Join Date
    Mar 2004
    Location
    Traveling...
    Posts
    56

    Default Re: How to create your own custom modules (CMPS 2.0 RC2)

    Ok, now what I would like to see is how you add custom options to your modules. Does anyone know or is there a link showing how?

  9. #49
    Join Date
    Mar 2004
    Location
    Traveling...
    Posts
    56

    Default Re: How to create your own custom modules (CMPS 2.0 RC2)

    Quote Originally Posted by Andy R View Post
    Ok, now what I would like to see is how you add custom options to your modules. Does anyone know or is there a link showing how?
    Ok, after much digging around I found this and I figured I would post the answer here.

    To add settings to your own custom module, set Vbulletin into debug mode by opening config.php and adding this line:

    Code:
    $config['Misc']['debug'] = true;
    Now edit your module via the admincp and you will see an option on the bottom to add settings.

    In your PHP script (using the example in this thread) your options will become available to you by doing this:

    Code:
    $cmps_options =& $vbulletin->adv_portal_opts;
    $vba_options = array_merge($cmps_options['adv_portal_custom_1'], $cmps_options['adv_global']);
    Now whatever you named your setting, you can use in the PHP file:

    Code:
    $vba_options['name_of_your_setting'];
    (Don't forget to disable debug mode)..

  10. #50
    Join Date
    May 2008
    Posts
    6

    Default Re: How to create your own custom modules (CMPS 2.0 RC2)

    Ok, thanks !

  11. #51
    Join Date
    Mar 2004
    Location
    Toronto, Ontario
    Posts
    46

    Default

    One thing that confuses me is how to add something that will run consistency through a few different pages, on its own in the "middle", while still running within vB/vBadvanced with the side/outer structure.

    What I've been able to gather so far is that vBA can run custom code on singe pages, but is it possible (any examples?) of PHP code running deeper than only one page? E.G. I want to run a new script off of its own db within the content area of the site (middle column, basically) but still have vB/vBA running the rest of the page.

    Is this possible? Can anyone offer any examples or suggestions?

    Thx!
    Last edited by Arkham; 09-03-2008 at 09:25 PM.

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

    Default

    Arkham, have you gone through the manual about integrating other pages?

  13. #53
    Join Date
    Sep 2008
    Posts
    4

    Default

    I have a code like this:
    <TABLE cellSpacing=0 cellPadding=0 border=0 width="182">
    <TBODY>
    <TR>
    <TD vAlign=top width=220>
    <TABLE cellSpacing=0 cellPadding=0 width=180 border=0>
    <TBODY>
    <TR>
    <TD class=cActive id=cHoSTC align=middle width=58
    height=20 alt=""><A class=Active id=aHoSTC
    onclick=switchActive(0);
    href="http://www.vnexpress.net/User/ck/hcms/HCMStockSmall.asp"
    target=ifrmContent>HoSTC</A></TD>
    <TD class=cNoActive id=cHaSTC align=middle width=58
    height=20 alt=""><A class=NoActive id=aHaSTC
    onclick=switchActive(1);
    href="http://www.vnexpress.net/User/ck/hns/HNStockSmall.asp"
    target=ifrmContent>HaSTC</A></TD>
    </TR></TBODY></TABLE>
    <TABLE class=tbHeader cellSpacing=1 cellPadding=1 width=180
    border=0>
    <TBODY>
    <TR align=middle>
    <TD class=cHeader align=middle width=38 rowSpan=2>Mã
    CK</TD>
    <TD class=cHeader align=middle width=38 rowSpan=2>TC</TD>
    <TD class=cHeader noWrap align=middle width=70
    colSpan=2>Khớp lệnh</TD>
    <TD class=cHeader align=middle width=52
    rowSpan=2>+/-</TD></TR>
    <TR>
    <TD class=cHeaderN align=middle width=35>Giá</TD>
    <TD class=cHeaderN align=middle
    width=35>KL</TD></TR></TBODY></TABLE><IFRAME id=ifrmContent
    border=false name=ifrmContent
    src="http://www.vnexpress.net/User/ck/hns/HNStockSmall.asp"
    frameBorder=0 noResize width=180 scrolling=no
    height=305></IFRAME>

    </TD></TR></TBODY></TABLE>



    </TD></TR></TBODY></TABLE>
    <STYLE type=text/css>.cActive {
    FONT-WEIGHT: bold; FONT-SIZE: 11px; BACKGROUND-IMAGE: url('http://www.vnexpress.net/User/ck/Source/images/bg_active.gif'); COLOR: #9e224d; FONT-FAMILY: Tahoma, "Times New Roman"; TEXT-DECORATION: none
    }
    .cNoActive {
    FONT-WEIGHT: normal; FONT-SIZE: 11px; BACKGROUND-IMAGE: url('http://www.vnexpress.net/User/ck/Source/images/bg_noactive.gif'); COLOR: #009140; FONT-FAMILY: Tahoma, "Times New Roman"; TEXT-DECORATION: none
    }
    .tbHeader {
    BORDER-RIGHT: #666666 1px solid; BORDER-LEFT: #666666 1px solid
    }
    .cHeader {
    FONT-WEIGHT: bold; FONT-SIZE: 11px; COLOR: #ffffff; FONT-FAMILY: Tahoma, "Times New Roman"; BACKGROUND-COLOR: #9e224d
    }
    .cHeaderN {
    FONT-WEIGHT: bold; FONT-SIZE: 11px; COLOR: #ffffff; FONT-FAMILY: Tahoma, "Times New Roman"; BACKGROUND-COLOR: #af637d
    }
    .Active {
    FONT-WEIGHT: bold; FONT-SIZE: 12px; CURSOR: pointer; COLOR: #9e224d; FONT-FAMILY: Tahoma, "Times New Roman"; TEXT-DECORATION: none
    }
    .NoActive {
    FONT-WEIGHT: normal; FONT-SIZE: 12px; CURSOR: pointer; COLOR: #009140; FONT-FAMILY: Tahoma, "Times New Roman"; TEXT-DECORATION: none
    }
    </STYLE>

    <SCRIPT language=javascript>
    function switchActive(i){
    if(i == 0){
    document.getElementById('cHoSTC').className = 'cActive';
    document.getElementById('cHaSTC').className = 'cNoActive';
    document.getElementById('aHoSTC').className = 'Active';
    document.getElementById('aHaSTC').className = 'NoActive';
    }
    else{
    document.getElementById('cHoSTC').className = 'cNoActive';
    document.getElementById('cHaSTC').className = 'cActive';
    document.getElementById('aHoSTC').className = 'NoActive';
    document.getElementById('aHaSTC').className = 'Active';
    }
    }
    </SCRIPT>


    I'd like to make it as a module in the left column. I saved this code as a php file and add a module by this php file. It's appeared but it stretched full of the width of the screen. Please help me on this. Thanks!

  14. #54

    Default

    Hmmm... when I go t save the new module, I receive the following error:

    You already have a Module with an identifier of ''. Please select a different identifier.

    Any thoughts?

  15. #55

    Default

    I have followed the 'tutorial' at the start of this thread to the letter...

    Here's what happens...

    When I am 'editing the module' and I click on 'Preview', I get the preview!

    When I go to my home page, the new module is missing?

    What am I doing wrong?

    Thanks in advance!

  16. #56

    Default

    Can we run Java in a custom module?

    Im trying to figure out how to do that in this thread: http://www.vbadvanced.com/forum/showthread.php?t=34857 if someone could help me please

  17. #57
    Join Date
    Sep 2007
    Posts
    1,694

    Default

    Quote Originally Posted by LCN2007 View Post
    Can we run Java in a custom module?

    Im trying to figure out how to do that in this thread: http://www.vbadvanced.com/forum/showthread.php?t=34857 if someone could help me please

    Javascript? Yes ,read post 41 in this thread.

    There is a slide show module here : http://www.vbadvanced.com/forum/showthread.php?t=32193
    Seen vB5 beta? No more vbulletin for me, done , gone,finished .

  18. #58

    Default

    Quote Originally Posted by CareyCrew View Post
    Javascript? Yes ,read post 41 in this thread.

    There is a slide show module here : http://www.vbadvanced.com/forum/showthread.php?t=32193
    I tried what it said in post #41 it doesnt work for me.

    I have thought about FPSS but from what i couldnt find the stand alone version.

    Plus the cost i dont want to pay if i can get rocketwerks one to work.

    FPSS=$30
    RWSS=Free

    Maybe you could help me figure out how to use the rocketwerks slide show on VBA? http://www.rocketwerx.com/products/r.../documentation

  19. #59
    Join Date
    May 2009
    Posts
    1

    Default

    Is the debug mode method of adding customized module options the "right" way to go about it?
    When you open a .module file in a text editor, all of the options you'd see in the CMPS Edit Module screen are listed in a strange notation like this one from the recentthreads module that comes with VBA CMPS:
    Code:
    ";s:8:"settings";a:25:{s:25:"portal_threads_showrating";a:9:{s:7:"varname";s:25:"portal_threads_showrating";s:10:"grouptitle";s:24:"adv_portal_latestthreads";s:5:"value";s:1:"1";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:5:"yesno";s:12:"displayorder";s:3:"200";s:9:"serialize";s:1:"0";s:5:"title";s:19:"Show Thread Ratings";s:11:"description";s:51:"Turn this option on to display the thread's rating.";}s:25:"portal_threads_stickyicon";a:9:{s:7:"varname";s:25:"portal_threads_stickyicon";s:10:"grouptitle";s:24:"adv_portal_latestthreads";s:5:"value";s:1:"0";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:5:"yesno";s:12:"displayorder";s:3:"210";s:9:"serialize";s:1:"0";s:5:"title";s:16:"Show Sticky Icon";s:11:"description";s:127:"Turn this option on if you would like to display the 'sticky' icon next to threads that have been marked as &quot;sticky&quot;.";}s:24:"portal_threads_multipage";a:9:{s:7:"varname";s:24:"portal_threads_multipage";s:10:"grouptitle";s:24:"adv_portal_latestthreads";s:5:"value";s:1:"0";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:5:"yesno";s:12:"displayorder";s:3:"220";s:9:"serialize";s:1:"0";s:5:"title";s:28:"Show Multi-Page Thread Links";s:11:"description";s:101:"Turn this option on to show a link to each individual page for threads that have span multiple pages.";}s:28:"portal_threads_showpaperclip";a:9:{s:7:"varname";s:28:"portal_threads_showpaperclip";s:10:"grouptitle";s:24:"adv_portal_latestthreads";s:5:"value";s:1:"1";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:5:"yesno";s:12:"displayorder";s:3:"230";s:9:"serialize";s:1:"0";s:5:"title";s:25:"Show Attachment Paperclip";s:11:"description";s:104:"Turn this option on to display the small 'paperclip' icon showing the number of attachments in a thread.";}s:27:"portal_threads_newpostarrow";a:9:{s:7:"varname";s:27:"portal_threads_newpostarrow";s:10:"grouptitle";s:24:"adv_portal_latestthreads";s:5:"value";s:1:"1";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:5:"yesno";s:12:"displayorder";s:3:"240";s:9:"serialize";s:1:"0";s:5:"title";s:19:"Show New Post Arrow";s:11:"description";s:119:"Turn this option on to display the "New Post" icon to allow users to go stright to the first unread post in the thread.";}s:21:"portal_threads_prefix";a:9:{s:7:"varname";s:21:"portal_threads_prefix";s:10:"grouptitle";s:24:"adv_portal_latestthreads";s:5:"value";s:1:"0";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:5:"yesno";s:12:"displayorder";s:3:"250";s:9:"serialize";s:1:"0";s:5:"title";s:11:"Show Prefix";s:11:"description";s:111:"Turn this option on if you would like to display the thread's prefix. Note this only works with vBulletin 3.7+.";}s:23:"portal_threads_lastpost";a:9:{s:7:"varname";s:23:"portal_threads_lastpost";s:10:"grouptitle";s:24:"adv_portal_latestthreads";s:5:"value";s:1:"1";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:5:"yesno";s:12:"displayorder";s:3:"150";s:9:"serialize";s:1:"0";s:5:"title";s:19:"Show Last Post Info";s:11:"description";s:82:"This option will display the last poster and time at which the last post was made.";}s:24:"portal_threads_showforum";a:9:{s:7:"varname";s:24:"portal_threads_showforum";s:10:"grouptitle";s:24:"adv_portal_latestthreads";s:5:"value";s:1:"0";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:5:"yesno";s:12:"displayorder";s:3:"160";s:9:"serialize";s:1:"0";s:5:"title";s:10:"Show Forum";s:11:"description";s:91:"Turn this option on to display the name of and link to the forum that the post was made in.";}s:26:"portal_threads_showpreview";a:9:{s:7:"varname";s:26:"portal_threads_showpreview";s:10:"grouptitle";s:24:"adv_portal_latestthreads";s:5:"value";s:1:"1";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:5:"yesno";s:12:"displayorder";s:3:"170";s:9:"serialize";s:1:"0";s:5:"title";s:23:"Show Preview of Threads";s:11:"description";s:124:"Turn this option on to show a preview of the first post in the thread when you hold your mouse over the title of the thread.";}s:23:"portal_threads_showicon";a:9:{s:7:"varname";s:23:"portal_threads_showicon";s:10:"grouptitle";s:24:"adv_portal_latestthreads";s:5:"value";s:1:"1";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:5:"yesno";s:12:"displayorder";s:3:"180";s:9:"serialize";s:1:"0";s:5:"title";s:17:"Show Thread Icons";s:11:"description";s:73:"Turn this option on to display the icon that was selected for the thread.";}s:29:"portal_threads_showsubscribed";a:9:{s:7:"varname";s:29:"portal_threads_showsubscribed";s:10:"grouptitle";s:24:"adv_portal_latestthreads";s:5:"value";s:1:"1";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:5:"yesno";s:12:"displayorder";s:3:"190";s:9:"serialize";s:1:"0";s:5:"title";s:20:"Show Subscribed Icon";s:11:"description";s:114:"Turn this option on to display a 'subscribed' icon next to the thread title if a user is subscribed to the thread.";}s:22:"portal_threads_replies";a:9:{s:7:"varname";s:22:"portal_threads_replies";s:10:"grouptitle";s:24:"adv_portal_latestthreads";s:5:"value";s:1:"1";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:5:"yesno";s:12:"displayorder";s:3:"140";s:9:"serialize";s:1:"0";s:5:"title";s:22:"Show Number of Replies";s:11:"description";s:65:"Turn this option on to display the number of replies to a thread.";}s:20:"portal_threads_views";a:9:{s:7:"varname";s:20:"portal_threads_views";s:10:"grouptitle";s:24:"adv_portal_latestthreads";s:5:"value";s:1:"1";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:5:"yesno";s:12:"displayorder";s:3:"130";s:9:"serialize";s:1:"0";s:5:"title";s:20:"Show Number of Views";s:11:"description";s:78:"Turn this option on to display the number of times the thread has been viewed.";}s:23:"portal_threads_showdate";a:9:{s:7:"varname";s:23:"portal_threads_showdate";s:10:"grouptitle";s:24:"adv_portal_latestthreads";s:5:"value";s:1:"1";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:5:"yesno";s:12:"displayorder";s:3:"120";s:9:"serialize";s:1:"0";s:5:"title";s:16:"Show Date & Time";s:11:"description";s:47:"Shows the time and date the thread was created.";}s:28:"portal_threads_threadstarter";a:9:{s:7:"varname";s:28:"portal_threads_threadstarter";s:10:"grouptitle";s:24:"adv_portal_latestthreads";s:5:"value";s:1:"1";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:5:"yesno";s:12:"displayorder";s:3:"110";s:9:"serialize";s:1:"0";s:5:"title";s:19:"Show Thread Starter";s:11:"description";s:89:"Turn this option on to display the thread starter's username and a link to their profile.";}s:23:"portal_applypermissions";a:9:{s:7:"varname";s:23:"portal_applypermissions";s:10:"grouptitle";s:24:"adv_portal_latestthreads";s:5:"value";s:1:"1";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:5:"yesno";s:12:"displayorder";s:3:"100";s:9:"serialize";s:1:"0";s:5:"title";s:23:"Apply Forum Permissions";s:11:"description";s:125:"Turn this option on to take your forum permissions into account and only show threads which the user has permission to view. ";}s:23:"portal_threads_expanded";a:9:{s:7:"varname";s:23:"portal_threads_expanded";s:10:"grouptitle";s:24:"adv_portal_latestthreads";s:5:"value";s:1:"2";s:12:"defaultvalue";s:0:"";s:10:"optioncode";s:760:"<div class=\"smallfont\">
    	<input name=\"$name\" id=\"$setting[varname]_0\" type=\"radio\" " . $jsdefault_onchange . " " . iif($setting[value] == 0, 'checked=\"checked\"'). " value=\"0\" tabindex=\"1\"><label for=\"$setting[varname]_0\">$vbphrase[lean]</label><br />
    	<input name=\"$name\" id=\"$setting[varname]_1\" type=\"radio\" " . $jsdefault_onchange . " " . iif($setting[value] == 1, 'checked=\"checked\"'). " value=\"1\" tabindex=\"1\"><label for=\"$setting[varname]_1\">$vbphrase[expanded]</label><br />
    	<input name=\"$name\" id=\"$setting[varname]_2\" type=\"radio\" " . $jsdefault_onchange . " " . iif($setting[value] == 2, 'checked=\"checked\"'). " value=\"2\" tabindex=\"1\"><label for=\"$setting[varname]_2\">$vbphrase[dynamic]</label>
    How do you go about making a description and selection for your customized settings in the Edit Module page for custom modules?

  20. #60
    Join Date
    Aug 2010
    Posts
    3

    Default

    This was perfect, thanks!

    Any way to make a background for it?
    It a plain white on my page, and my forum is orange and black, it looks very bad, lol.

Page 3 of 4 FirstFirst 1234 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 09-11-2005, 04:37 PM
  2. Replies: 2
    Last Post: 07-10-2005, 05:37 PM
  3. Custom Layout Including CMPS Modules
    By gilbert in forum Add-On Modules & Modifications
    Replies: 2
    Last Post: 05-24-2005, 02:15 AM
  4. Create custom pages/content
    By Seraphis-XII in forum Troubleshooting / "How do I..." Questions
    Replies: 9
    Last Post: 09-12-2004, 11:36 AM
  5. create new modules
    By Zedd in forum Troubleshooting / "How do I..." Questions
    Replies: 14
    Last Post: 08-14-2004, 08:23 PM

Posting Permissions

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