PDA


View Full Version : Basic Module


Pages : [1] 2

cLord
05-25-2004, 07:57 AM
This will add a basic module to your CMPS in witch you can put images, text, etc...

In your Admincp - Styles & Templates - Style Manager - Add a new template called "adv_portal_custom_1".

Insert this code into the template (replace the blue code with your text/code):

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vba_options[portal_blockbullet] Custom Module 1</b></span></td>
</tr>
<tr>
<td class="$getbgrow" width="100%">

<!-- Begin custom code -->
Your custom code comes here.
<!-- End custom code -->

</td>
</tr>
</table>
<br />Save the template!

Still in your Admincp - vBa CMPS - Add Module

- Module Title - Custom 1
- Module Identifier - Leave blank
- OR Template to Include - custom_1
- Activate and select the column you want it in.
- Save and you are done.

Have Fun,
cLord ;)

joeychgo
05-25-2004, 01:29 PM
Hey -- Your handy to have around LOL


THANKS ALOT!!!!!!!!!!!!!!!!!!!

Brian
05-25-2004, 02:09 PM
http://www.vbadvanced.com/membersarea.php?do=viewmanual&productid=4&pageid=5#generictemp ;)

Lurk
05-25-2004, 11:49 PM
i think his is easier ;)

joeychgo
05-26-2004, 12:19 AM
whos?

Lurk
05-26-2004, 11:45 AM
cLord's

joeychgo
05-27-2004, 12:43 AM
I used cLord's --- looks fine to me......... THanks cLord!

cLord
05-27-2004, 11:48 AM
This will add a collapsible basic module to your CMPS in witch you can put images, text, etc...

Create a new module called custom_1.php (this can be done with notepad)

Insert this code into the PHP file:

<?php

$collapseobj_custom_1 = $vbcollapse['collapseobj_custom_1'];
$collapseimg_custom_1 = $vbcollapse['collapseimg_custom_1'];

eval('$home[$mods[\'modid\']][\'content\'] .= "' . fetch_template('adv_portal_custom_1') . '";');

?>Save & upload the PHP file to your modules dir.

In your Admincp - Styles & Templates - Style Manager - Add a new template called "adv_portal_custom_1".

Insert this code into the template:

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<thead>
<tr>
<td class="tcat">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('custom_1')"><img id="collapseimg_custom_1" src="$stylevar[imgdir_button]/collapse_tcat$collapseimg_custom_1.gif" alt="" border="0" /></a>
<span class="smallfont"><strong>$vba_options[portal_blockbullet] Custom Module 1</strong></span></td>
</tr>
</thead>
<tbody id="collapseobj_custom_1" style="$collapseobj_custom_1">
<tr>
<td class="$getbgrow">
<!-- Begin custom code -->
Your custom code comes here.
<!-- End custom code -->
</td>
</tr>
</tbody>
</table>
<br />Save the template!

Still in your Admincp - vBa CMPS - Add Module

- Module Title - Custom 1
- Module Identifier - Leave blank
- File to include - Select custom_1.php
- OR Template to Include - Leave blank
- Activate and select the column you want it in.
- Save and you are done.

Based upon Richard's Collapsible Modules Hack (http://www.vbadvanced.com/forum/showthread.php?t=1044)

Have Fun,
cLord ;)

PixelFX
05-28-2004, 05:50 PM
very nice :) gotta love vba cmps & vb3.01 :)

Lurk
05-29-2004, 10:36 PM
yeah :) :D

TheSauceMaster
05-30-2004, 03:46 AM
Okay maybe I am tired or just dumb ..I haven't figured it out ...I got the
basic module installed fine , but it will only show up on the page I want it too if I have it check marked for the main index , soon as I uncheck it for the main page it disappears on all pages.

http://www.pacertalk.com

am I just trying to do something impossiable ?

I have the navigation linking to http://www.pacertalk.com/index.php?page=roster

I have nothing but my custom_1 checkmarked and the news still shows on the roster page

I have made a adv_portal_custom_1

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vba_options[portal_blockbullet] Pacers Roster</b></span></td>
</tr>
<tr>
<td class="$getbgrow" width="100%">

<!-- Begin custom code -->
Your custom code comes here.
<!-- End custom code -->

</td>
</tr>
</table>
<br />

I added a Page

Page Title - Pacer Roster
Page Identifier - http://www.pacertalk.com/index.php?page=roster
Page Template - adv_portal_custom_1

I have in the Center , custom_1 ..Only checkmarked.

Module
Module Title - Custom 1
Module Identifier - blank
Template to Include - custom_1


About ready to pull my hair out ..lol

TheSauceMaster
05-30-2004, 09:09 AM
problem solved , I was using the full url when I created the page unstead of just using "roster" as the indentifer.

Webber
09-01-2004, 04:47 PM
Noob here I have a cgi/perl script that I want to put in a module.... but the only way I can pull it in on ylpnews template is via an IFrame... I'm pulling my hair out .....I even tried a JS converter but I got errors.

Any ideas on how I can do this?

Samir
09-02-2004, 08:42 PM
Have you tried using the html or php include functions?

Webber
09-06-2004, 12:53 PM
Hi Samir, ok real noob here.... how would I use those functions? Do you mean the php include in the templates? I wouldn't know where to begin on this.... any help is greatly appeciated.

Samir
09-06-2004, 07:37 PM
In HTML there is something call Server Side Includes (SSI). I'm not sure if you can use that or not. In php, there are all sorts of ways to include something in the php code. Here's a link to something I've been using:
http://www.vbadvanced.com/forum/showthread.php?t=1082

I just noticed you posted in there too, lol. Did you try the hack from vb.org? What exactly is this cgi and how does it work? I'm no programmer, but I may be able to help you.

DoKOK
09-17-2004, 12:42 AM
How can I make a module NOT show on register & login pages.

That would be for google ads.

Samir
09-17-2004, 04:38 AM
How are you getting it to show in the first place? Did you modify templates?

bonnmac
10-29-2004, 05:59 PM
I don't consider myself an idiot, and I've followed your instructions to the T. But module won't show up. It's activated, and I have it as #1 on the left side. Code in template is:

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vba_options[portal_blockbullet] Custom Module 1</b></span></td>
</tr>
<tr>
<td class="$getbgrow" width="100%">

<!-- Begin custom code -->
Your Ad Here!
4 Lines
1 URL
$2.00/wk
<!-- End custom code -->

</td>
</tr>
</table>
<br />

http://ptrsupport.com

Any Ideas?

Viks
11-09-2004, 12:07 AM
This will add a basic module to your CMPS in witch you can put images, text, etc...

In your Admincp - Styles & Templates - Style Manager - Add a new template called "adv_portal_custom_1".
cLord ;)


This is a very useful hack. I've installed it too. however, my question is -

- If i have a large content on this custom module page but i want to show only some part of it... in my main (portal) index page and then when users click on it.. i want the users to goto the this custom page...
How can i go about achieving that???


just like show new threads...

Samir
11-09-2004, 12:25 AM
This would all have to be hard coded, but what you could do is have a custom module on the front page which links to a page with the complete text of the custom module. You'd actually be making 2 different templates with the same information--one template with the link to the other complete text template.

Viks
11-09-2004, 03:14 AM
This would all have to be hard coded, but what you could do is have a custom module on the front page which links to a page with the complete text of the custom module. You'd actually be making 2 different templates with the same information--one template with the link to the other complete text template.

yup. thats wat im doing write now...but i need to add a bunch of more cust. modules and i't wud be a pain to manage all that.

Samir
11-09-2004, 07:00 PM
Yeah, I see what you're saying. But I don't know of any solution except writing a custom hack that would do that sort of thing. The hard part is that it's linking to custom modules. If it were threads or something else like that then maybe using part of the existing system would work.

russbo
11-24-2004, 04:48 AM
Is there an easy way of having a web page (from a server that does NOT have my vbulletin installation, my site is rather large) show up in this hack? What would I input into the "Your custom code comes here" section???

I looked at Dr Erwin's html.php thread, but as I've said, I'm dealing with two different servers, and I can't seem to get it to work.

Thanks!

Artayick
11-24-2004, 09:29 AM
hmmm that is a tough one cause you are still going to have to bring the results from that page back to the server that has the vb on it. You can't get it to send the templates info to another server cause once you leave your vb one it would stop working.. so in this problem you have to find a way to pull the code from the other server to your vb one but if you are using two servers already it might not do you anygood cause the load is still going to be increaded on a single server..

Samir
11-24-2004, 12:57 PM
Is there an easy way of having a web page (from a server that does NOT have my vbulletin installation, my site is rather large) show up in this hack? What would I input into the "Your custom code comes here" section???
I don't know if this helps, but I modified some hack I found on vb.org (don't remember off hand, but do have it documented) to make my link forums make the other site within a frame. Maybe something like that could be used for what you want to do. See it in action at http://www.huntsvillecarscene.com/forumdisplay.php?f=10

nyifan
11-30-2004, 01:45 AM
Thank you so much for writing this - it's exactly what I needed!
That said, and at the risk of sounding like a total idiot, can someone tell me how to use this in multiple instances, if I have to stay with the custom_1 naming scheme, and if I need a php file for each module?

I tried creating a module with the name navigation, with a matching template (with the adv_portal_ prefix of course) and adding it to a page but it doesnt show up (grr)

Its quite possible i'm missing something totally obvious as its almost 1am and ive been up since 5 :eek: so I will try again tomorrow, just thought it might be worth tossing the question to the pros in case it's not sleep depravation causing my blindness and inability to "get" this. vBA went in like a champ, and I have had no problems installing the few add-ons I needed, so I'm hoping its being tired, but ya never know ;)

Thanks again for EVERYTHING this community does - vBA, and all it's add-ons, customizations etc are such an AWESOME compliment to vB

Samir
11-30-2004, 02:49 PM
You don't need to have a php file for a module. You can just have a template. The "Local Weather" box on my site at www.huntsvillecarscene.com is a good example of that. Even when you have custom php files, you can name them anything. The random pics, model, and video modules run 3 separate php files.

I'm not sure what you are trying to do with the name navigation, so I don't know how to help. Is it a site navigation module or something completely different?

nyifan
11-30-2004, 05:19 PM
ok, lets see if I can maybe make some sense (but 1st, thanks for the reply and trying to help!)

i have a site with WAY too many navigation links, but unfortunately, they are necessary. So I thought i would break them up into 4 groups, and make each group collapsable, so they could be opened and closed as the user chooses.

How would I do this without a php file then? I thought the 1st step was making a php file, but maybe im just confusing myself even worse? (Im trying to do this and make the vBMenu play nicely, and losing in both battles - annoying, because I KNOW I am missing something totally easy in both cases, I just cant see it!)

Thanks again for trying to help. Maybe if you could just suggest a way to make 4 collapsing modules, each with navigation links in them I can figure out what the heck Im doing wrong?

Samir
11-30-2004, 05:28 PM
Cool. That's actually pretty easy. Here's a link to a collapsing module: http://www.vbadvanced.com/forum/showthread.php?t=2294

Now I'd use that and make 4 different modules, each with the different groups of navigational links. No php, just templates. :)

nyifan
11-30-2004, 06:08 PM
OK will be trying that late tonight when I get home from work - will let you know!

:)

nyifan
12-02-2004, 04:49 PM
Cool. That's actually pretty easy. Here's a link to a collapsing module: http://www.vbadvanced.com/forum/showthread.php?t=2294

Now I'd use that and make 4 different modules, each with the different groups of navigational links. No php, just templates. :)Done, and working brilliantly. Now, may I ask what the difference is between the one you linked and the one above? (cLords post of 5/27, 10am)

I also was able to get the vBMenu issues I was having resolved - the vB manual explanation for whatever reason wasn't clicking for me, but once I looked at source and played around, I got what I wanted working :)

Thanks for the help Samir!

Samir
12-02-2004, 05:07 PM
Done, and working brilliantly. Now, may I ask what the difference is between the one you linked and the one above? (cLords post of 5/27, 10am)
The one in cLords post above requires a php file as well as a template. The link requires only a template. (I plan to use it on my site once I get time.)

I also was able to get the vBMenu issues I was having resolved - the vB manual explanation for whatever reason wasn't clicking for me, but once I looked at source and played around, I got what I wanted working :)
Excellent! Now give us the url so we can check out your work! ;)

nyifan
12-02-2004, 05:55 PM
Excellent! Now give us the url so we can check out your work! ;)
Right now, im running it locally so i can work out all the kinks, and not effect users - soon as it's live, i'd be happy to :)

Samir
12-02-2004, 08:47 PM
Right now, im running it locally so i can work out all the kinks, and not effect users - soon as it's live, i'd be happy to :)
Ah yes, why didn't I think of that? I do the same thing. :D I guess great minds think alike. ;)

ScottRempel
12-08-2004, 11:49 AM
Quick question from a newb....can I use one of these basic modules to run ads by simply inserting the ad code where the text, pic, etc would usually go? Or is there a better module for ads?

Thanks

P.S. I have found a google module someone made, which is fine, but I'm curious if this basic one will work for all types of ads.

Edit: Figured out how to do a google ad finally...the guy that made the google module had an error in his module setup so I was getting nothing for a bit.

Samir
12-09-2004, 12:01 AM
I think it should work fine. I'm running phpadsnew on my test server and have the javascript code inside this module and it works fine.

Cyberleish
12-27-2004, 06:45 PM
Worked very well and simple too

kwopper
02-14-2005, 08:28 AM
Thank you for a nice easy mod. I am still learning this coding stuff and have one question. When you add links to this...how do you set it so each link shows on its own line. Sample....

within the module...

link 1
link 2
link 3

mine go like this...

link1 link2 link 3


Thanks for your help

theMusicMan
02-14-2005, 08:43 AM
You can either make sure that each link is contained within its own row or by forcing a line break after each link url by using <br>.

kwopper
02-14-2005, 10:23 AM
Thank you...that is what I was looking for.

Deviant++
02-16-2005, 03:26 PM
i didn't read though this thread but I've made multiple instances of the module but which I click expand or minimize, different blocks collapse or minimize...not the one clicked on.


http://forums.deviatedhq.com

Samir
02-18-2005, 01:55 AM
I see what you're saying. I see you've tried the other module I posted a link to. What was the problem you ran into with that one? It's simpler because it's just a template, so it should be easy to debug.

Deviant++
02-18-2005, 05:15 AM
I didn't use that one, I used this one with the <!begin custom code

thing..that one didn't work.

Samir
02-18-2005, 05:52 PM
So what was the problem with the other one? Did it just not display or not work at all.

Deviant++
02-19-2005, 04:53 AM
I put in everything, nothing appeared..

Deviant++
02-19-2005, 12:20 PM
switched to non collapsable mod

Milk Man
04-06-2005, 07:13 AM
Cheers Clord, that helps heaps.

Milk Man
04-06-2005, 07:21 AM
ok, i thought i had this figured, and I followed what you said, but it won't show up on my site

tgimm.com

what have i done wrong?

Milk Man
04-06-2005, 08:26 AM
I don't consider myself an idiot, and I've followed your instructions to the T. But module won't show up. It's activated, and I have it as #1 on the left side. Code in template is:

<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><b>$vba_options[portal_blockbullet] Custom Module 1</b></span></td>
</tr>
<tr>
<td class="$getbgrow" width="100%">

<!-- Begin custom code -->
Your Ad Here!
4 Lines
1 URL
$2.00/wk
<!-- End custom code -->

</td>
</tr>
</table>
<br />

http://ptrsupport.com

Any Ideas?

I think i know what has happened. Do you have any other skins on your site? I had the same problem but then realised I added the template to the wrong skin. Now it works.