PDA

View Full Version : How Do I Add a Module?


C_P
09-15-2004, 09:21 AM
I've read many posts on adding modules here. I've made several attempts with not much success.
Now, this could be not only due to my lack of knowledge using this system or just plain lack of knowledge.
Either way, I have used approximately 4 different portal CMS systems including Xoops, phpnuke, YaPP, ttcms, and MyIBF for IBF and SMF and not one are as difficult for me to use as this one.
I am not complaining at all, do not take me wrong, as I said "difficult for me".
I would like to add my Google Ad block, a sports block, a virus info block, and possibly add blocks to another page at our site.
I would really appreciate some staff assistance walk through with me at my site in achieving this. I ask for staff as this would require admin access to my site to walk me through this.
I really am not an idiot, but as I said, this is not as easy as adding code in a block and hitting activate as all the other systems I've used did.
Thank you VERY much for understanding my personal need for this.
I promise you, once I get it, if a noobie comes aboard and just cannot get it... I can be contacted in future to assist.

Brian
09-15-2004, 12:09 PM
Can you post what you have for one of the modules?

Our Sponsors
 

C_P
09-15-2004, 12:31 PM
Can you post what you have for one of the modules?
Will be glad to Brian. I will have to do it this evening from home where I have this info.

C_P
09-15-2004, 08:31 PM
Google Block

<b>Sponsored Links</b><br><br>
<script type="text/javascript"><!--
google_ad_client = "pub-8668582282583380";
google_ad_width = 120;
google_ad_height = 240;
google_ad_format = "120x240_as";
google_ad_channel ="";
google_ad_type = "text";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br><br>

Sports Block I've seen this somewhere before. I would like the default to be NFL and how do I change the default in this code for NBA season, etc.
$data = <<<EOF
<center><form name="jumpy">
<select name="example" size="1" onChange="gone()">
<option value="http://www.sportsline.com/nfl/box-scoreboards">NFL</option>
<option value="http://www.sportsline.com/mlb/box-scoreboards">mlb</option>
<option value="http://www.sportsline.com/nhl/box-scoreboards">NHL</option>
<option value="http://www.sportsline.com/nba/box-scoreboards">NBA</option>
<option value="http://www.sportsline.com/u/includes/script/PGA_leader_inc.htm">PGA</option>
<option value="http://www.sportsline.com/collegefootball/box-scoreboards">NCAA Football</option>
<option value="http://www.sportsline.com/collegebasketball/box-scoreboards">NCAA Basketball</option>
<option value="http://www.vegasinsider.com/u/includes/script/odds_inc.htm">Las Vegas Odds</option>
</select>
</form><center>
<p>Courtesy of CBS Sportsline<p>

<script language="javascript">
var displaymode=0

<!-- This adds the iframe -->
var iframecode='<center><iframe id="external" style="width:165px;height:230px" src="http://www.sportsline.com/mlb/box-scoreboards" scrolling="auto" border=0 marginwidth="1" marginheight="1" align="center" frameborder="0"></iframe></center>'

if (displaymode==0)
document.write(iframecode)

function gone(){
var selectedurl=document.jumpy.example.options[document.jumpy.example.selectedIndex].value
if (document.getElementById&&displaymode==0)
document.getElementById("external").src=selectedurl
else if (document.all&&displaymode==0)
document.all.external.src=selectedurl
else{
if (!window.win2||win2.closed)
win2=window.open(selectedurl)
//else if win2 already exists
else{
win2.location=selectedurl
win2.focus()
}
}
}
</script>
EOF;


I also have som "admin only" links I'd like to add to a user block, but need direction on that and not posting those links here though. I can send you what I want to do and where I would like them in via PM here or IM, it is up to you or whoever can help...
Thank you again Brian.

Our Sponsors
 

KW802
09-15-2004, 08:57 PM
C_P,

Once you get the hang of it it'll come easy enough for you. Let's start with the basics one module at a time. For demonstration purposes let's start with the Google module. I'm going to give a few steps below in how to add it to your front page. The code you gave for the Google ads is for a vertical ad so my example will take that into account. For the purpose of abbreviation the vBulletin Administrator's Control Panel will be shown as ACP. Go ACP --> Styles & Templates --> Style Manager --> {choose your parent style} Add New Template Call the new template "adv_portal_google" (but without the quotes). Cut & paste this code into the new template
<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr><td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet] $mods[title]<strong></span></td></tr>
<tr><td class="$getbgrow" width="100%"><center>

<script type="text/javascript"><!--
google_ad_client = "pub-8668582282583380";
google_ad_width = 120;
google_ad_height = 240;
google_ad_format = "120x240_as";
google_ad_channel ="";
google_ad_type = "text";
google_color_border = "CCCCCC";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</center></td></tr></table><br /> Save your template Go ACP --> vBa CMPS --> Add Module Use the following values for the fields....(without the quotes) Module title = "Sponsored Links" Template to include = "google" Active = yes Column = left column Save the new module. Go ACP --> vBa CMPS --> Edit Pages --> Choose the "Default / Homepage" In the second section titled "Modules Enabled" you'll now see a new listing called "Google" in the "Left Column" area. Make sure that the check box for it is turned on.That's it, you're done! Let us know how this goes and we'll go from there.

C_P
09-15-2004, 09:18 PM
Thank you soooo very much for this!
But, as I said.... I must suck at this...


I did exact steps but.... no Google:

Buddy List
Mini Calendar
Sponsored Links
Welcome Block
Online Users
Latest Forum Topics
Quick Moderation
Current Poll
Search
Stats

I do see it in my Edit modules list:

Left Column
Buddy List
Move to: [-»] [-›]
Mini Calendar
Move to: [-»] [-›]
Welcome Block
Move to: [-»] [-›]
Online Users
Move to: [-»] [-›]
Latest Forum Topics
Move to: [-»] [-›]
Quick Moderation
Move to: [-»] [-›]
Current Poll
Move to: [-»] [-›]
Search
(Inactive)
Move to: [-»] [-›]
Stats
Move to: [-»] [-›]
Sports
(Inactive)
Move to: [-»] [-›]
Sponsored Links <------- Here
Move to: [-»] [-›]

C_P
09-15-2004, 10:10 PM
Ok, this probably should be made sticky and some adjustments made so not eveyone uses my Google Ad code... but, I was able to do this step by step correctly!
I even added the sports block! Not the php code one above but the html one and was able to modify it to display NFL (Go Green Bay and Raiders! ) as the default!
The confusion was coming from the
Call the new template "adv_portal_google" (but without the quotes) portion.
I am not sure why it is needed to add the adv_portal_ prior to the name of the code template, nor does this code lacky care. for all thos reading this, just know it is needed. ;)
Now, about php and any other code, is it added EXACTLY the same as HTML with no differences?

KW802
09-15-2004, 10:56 PM
Ok, this probably should be made sticky and some adjustments made so not eveyone uses my Google Ad code... but, I was able to do this step by step correctly!
I even added the sports block! Not the php code one above but the html one and was able to modify it to display NFL (Go Green Bay and Raiders! ) as the default!
The confusion was coming from the
Call the new template "adv_portal_google" (but without the quotes) portion.
I am not sure why it is needed to add the adv_portal_ prior to the name of the code template, nor does this code lacky care. for all thos reading this, just know it is needed. ;)
Now, about php and any other code, is it added EXACTLY the same as HTML with no differences?
Very :cool: to see you got it working! Brian could explain why the template name needs to be prefixed with "adv_portal_" but I never really questioned it because by default it keeps all of my custom vBa CMPS templates together.

Sounds like you're ready to move on to some more complicated modules involving PHP. Now this is where it gets a little tricky because it depends upon how the PHP code was written and what exactly the end goal is.

Do you have a particular PHP module in mind that you want to install?

C_P
09-19-2004, 12:37 AM
I am so sorry I did not see the reply to this post.
The .php code I do not have right now for some reason or another.... but, I would like to add a couple of links that only admin or mods can see if possible to an existing block such as the default Computer Paradise Statistics block.

indie
10-03-2004, 05:14 PM
great help, thx

indie
10-03-2004, 05:33 PM
You have a strong title, where it should be /strong

mudanoman
11-16-2004, 10:59 PM
KW802 and C_P, thanks for the post and info. Worked perfectly. Cheers, mm