Author |
Message |
viper155
Regular


Joined: Feb 18, 2006
Posts: 99
|
Posted:
Wed Jun 13, 2007 11:14 pm |
|
Is there a way to just hide the left blocks in the read more page, Article.php Im guessing?
Im asking bc the search engines seem to index my left block nav menu instead of the actualy story text.
Thanks. |
|
|
|
 |
FireATST
RavenNuke(tm) Development Team

Joined: Jun 12, 2004
Posts: 654
Location: Ohio
|
Posted:
Thu Jun 14, 2007 5:26 am |
|
|
 |
 |
viper155

|
Posted:
Thu Jun 14, 2007 4:31 pm |
|
Quote: | written by manunkind Another quick question.....how do I remove these left blocks only when I am reading an article? I know I can add "News" to my above code, but that removes them from the home page as well. I want them there, but not when I click to read a full article.
Any ideas? |
This guy asked the same question and there was no answer as to how he was able to do this, but did say he got it working. |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Fri Jun 15, 2007 6:25 am |
|
You could possibly do something like this. In the original post reference above from Raven, he has this:
Code:
if ($name=="News") {}
else blocks(left);
|
Try this:
Code:
if ($name=="News" && $file="article") {}
else blocks(left);
|
You will also have to add $file to the globals statement above this. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
viper155

|
Posted:
Fri Jun 15, 2007 7:52 pm |
|
This is what my code looks like in theme.php
Code:
global $name, $file;
if ($name=='Forums') {}
else if ($name=="News" && $file="article") {}
else {
blocks(left);
|
It is still removing the left blocks on the homepage as well.  |
|
|
|
 |
montego

|
Posted:
Sat Jun 16, 2007 1:30 pm |
|
viper155, can you please zip up your entire theme directory for this theme and send it to me at montego AT montegoscipts DOT com and I'll take a look at it when I get a chance. |
|
|
|
 |
gregexp
The Mouse Is Extension Of Arm

Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol
|
Posted:
Sat Jun 16, 2007 4:21 pm |
|
Try Changing it to this:
global $name, $file;
if ($name=='Forums') {}
else if ($name=="News" && $file="article" && !defined('HOME_FILE')) {}
else {
blocks(left);
The !defined HOME_FILE references a definition set in index.php of your site which should resolve your issue. |
_________________ For those who stand shall NEVER fall and those who fall shall RISE once more!! |
|
 |
 |
viper155

|
Posted:
Sat Jun 16, 2007 8:46 pm |
|
It works perfectly Gregexp, also would like to thank everyone else in this thread for trying to help me. |
|
|
|
 |
viper155

|
Posted:
Sun Mar 15, 2009 6:47 pm |
|
Kinda bumping my own post from a while ago to attempt to get a new problem solved, hope this is okay instead of starting a new post.
I am using the theme CT_RN which came with the new revennuke and its very very nice I must stay. The theme I use to use had a different theme.php file setup and I was able to hide left blocks only on the article part of the news module using this code:
Code:
global $name, $file;
if ($name=='Forums') {}
else if ($name=='Amazon') {}
else if ($name=='Content') {}
else if ($name=="News" && $file="article" && !defined('HOME_FILE')) {}
else {
blocks(left);
|
Now on the theme CT_RN the theme.php file is setup like this for hiding blocks
Code:
// Column 1 (left)
if (($module_name != 'Forums') AND ($module_name !='Your_Account') AND ($module_name !='Journal') AND ($module_name !='TTBO') AND ($module_name !='Topics') AND ($module_name !='Private_Messages') AND ($module_name !='Youtube_Videos') AND ($module_name !='Members_List')):
echo '<div class="col1">';
|
Does anyone know how I fix this Code:
else if ($name=="News" && $file="article" && !defined('HOME_FILE')) {}
| to work for the CT_RN type of theme.php?
*EDITED* Figures I post that and then it gets figured out. Just in case someone else has this problem this is how the code should look to do what I explained above.
Code:
// Column 1 (left)
if (($module_name != 'Forums') AND ($module_name !='Your_Account') AND ($module_name !='Journal') AND ($module_name !='TTBO') AND ($module_name !='Topics') AND ($module_name !='Private_Messages') AND ($module_name !='Youtube_Videos') AND ($module_name !='Members_List') AND ($module_name ='News' AND $file != 'article'):
echo '<div class="col1">';
|
|
|
|
|
 |
|