View Full Version : Huge problem for me
joeychgo
05-17-2004, 06:03 AM
I have the hack 'adcolumns' installed.
http://www.vbulletin.org/forum/showthread.php?t=62348
when I run CMPS it shows the Ad column on the page..........squeezing the right column of CMPS (see attached screenshot)
SO how do I get the two to work together?
ogetbilo
05-17-2004, 06:23 AM
Did you try to increase the right column size from
adminCP --> vBa CMPS --> edit pages --> Default/HomePage --> Right Column Width : ...
Try to set a fixed value, rather than a percentage (ie give a number btw 120 - 180). and see what happens.
joeychgo
05-17-2004, 06:24 AM
no I can tell already that wont work. Adcolumns has to be turned off for this page...thats the only answer
ogetbilo
05-17-2004, 06:29 AM
try to resize the center column
open the adv_portal template
find:
<if condition="$show['center_column']">
<td valign="top">
replace with
<if condition="$show['center_column']">
<td valign="top" width=XX% >
and play with that XX number (btw 40-60)
You don't want to turn off ads on your main page, do you?:)
joeychgo
05-17-2004, 06:31 AM
no no -- resizing any column will only leave the adcolumn there.......who wants that many columns?
the adcolumns has to be conditioned out of that page somehow.....
ogetbilo
05-17-2004, 06:33 AM
oh ok. I understood you wrong. Let me check the hack and see what it does.
joeychgo
05-17-2004, 06:34 AM
Thanks
http://www.lincolnvscadillac.com/cmps_index.php?
is my page so you can check source.... its working,
joeychgo
05-17-2004, 06:38 AM
The other trick, is how do we condition adcolumns out of this page but not necessarily other new pages that are created with this?
ogetbilo
05-17-2004, 06:53 AM
ok my suggestion would be
-open the footer template. copy all the contents
-edit the adv_portal template:
1-replace the $footer towards the end with the text you copied above.
2-then remove the section starting with <!-- BEGIN AdColumns --> (ie all the hack)
3-save the adv_portal template
edit: I know it is not the most elegant solution but I still did not understand how Brian wrote the code to fetch the footer template:)
edit2: ok, he gets it from the global.php . There you can define an alternative $footer (for ex: $footer_no_ad) to be used on certain pages, which does not include the ad hack and use this $footer_no_ad on pages you do not want to have the advertisements.
Hope you know how to do this
joeychgo
05-17-2004, 07:02 AM
I have no clue -- Im way still learning........
I dont think its in the footer though, I think adcolumns comes out of global.php
ogetbilo
05-17-2004, 07:08 AM
I have no clue -- Im way still learning........
I dont think its in the footer though, I think adcolumns comes out of global.php
I checked the hack you gave the link to. The ads on the right hand side are controlled in the footer template. Because the vba CMPS uses the same footer as the forum (which was not the case for vbadvanced) you see the ads both inside the forum and on the main page.
hence, you want to remove the ad hack from the footer template on the main page.
the above modification should be enough for this.
joeychgo
05-17-2004, 07:12 AM
well - I removed the footer ($footer) command - and that works -- of course I have no footer now, so thats the next step...
joeychgo
05-17-2004, 07:22 AM
I tried making a seperate footer template without the adcolumns -- that didnt work.... same as no footer at all...
ogetbilo
05-17-2004, 07:24 AM
I tried making a seperate footer template without the adcolumns -- that didnt work.... same as no footer at all...
If you make a different template you have to define it in the global.php.
But I just checked and everything seems to me alright now. Is it not? ops sorry. I didn't look at the cmps_index. (It is normal when it is 6 oclock in the morning:))
joeychgo
05-17-2004, 07:25 AM
no i put the footer back columns still there. im toying with things... im learning, so I do things by trial and error, mostly error
How do I define it in the global ???
ogetbilo
05-17-2004, 07:30 AM
no i put the footer back columns still there. im toying with things... im learning, so I do things by trial and error, mostly error
How do I define it in the global ???
suppose the new footer template you created without the ad is called footer_no_ad
open the global.php
find:
eval('$footer = "' . fetch_template('footer') . '";');
just add underneath:
eval('$footer_no_ad = "' . fetch_template('footer_no_ad') . '";');
and don't forget to replace the $footer with $footer_no_ad in adv_portal template
joeychgo
05-17-2004, 07:37 AM
I tried that -- no good. it shows no footer at all
fyi I named mine footer_CMPS
ogetbilo
05-17-2004, 07:43 AM
Ok one last thing (because I really need to get some sleep):
Can you find the
// the really important ones
'header',
'footer',
in global.php . then add
'footer_CMPS',
under the 'footer',
As a summary you do this above modification with the fetchtemplate modification I mentioned before. Then you replace the $footer with the $footer_CMPS in the adv_portal template.
That should be it. Or I am missing something. In any case, sorry for keeping you busy so long.
edit: btw, did you get my pm?
joeychgo
05-17-2004, 07:47 AM
you lost me totally there
yes i got the pm
Brian
05-17-2004, 10:42 AM
The easiest way to take care of this would probably be with an if condition. I haven't used this hack so I can't tell you the exact code, but if you'll find the variable or code for the ad column in your footer template and add this before it:
<if condition="THIS_SCRIPT != 'adv_index'">
Then add this after it:
</if>
That should disable the ad column on your homepage.
joeychgo
05-17-2004, 11:00 AM
Yup == That worked Thanks!!!!!!!
ogetbilo
05-17-2004, 06:52 PM
aaargh, I still don't know what kind of variables can be used in the templates.
Still learning, still learning...:)
joeychgo
05-17-2004, 08:01 PM
same here -- I was pretty sure it had to be a conditional, just wasnt sure how to write it.
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.