Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Remove Primary Content Widget Details »
Remove Primary Content Widget
Mod Version: 1.00, by tommyxv (Member) tommyxv is offline
Developer Last Online: Oct 2015 I like it Show Printable Version Email this Page

vB Version: 4.x.x Rating: (2 votes - 5.00 average) Installs: 21
Released: 17 Aug 2011 Last Update: Never Downloads: 0
Not Supported Template Edits Re-usable Code  

This is for removing the primary content widget from the CMS homepage/index and keeping it only on the pages you desire.

Only Admins will be able to see it on the CMS homepage/index for page setting purposes. Just put your mouse where the primary content box would be and you will see the edit pencil image come up.

Many thanks to Lynne for the help.

You MUST change the variables to the names of your pages.

Examples:

MY SITE URL/content.php?1-home
1-home is my CMS index so I would change 1-name_here to 1-home and the first line would look like:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


MY SITE URL/content.php?2-docs
2-docs is one of my CMS pages so I would change x-name_here to 2-docs and the line would look like:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

If you have multiple pages then the line above will look something like this:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.




1) Find the vbcms_content_section_page template

2) Replace contents with this. (You MUST change the variables to the names of your pages as shown in the examples above)


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.



UPDATED CONDITIONAL STATEMENT TO SHOW THE EDIT PENCIL AGAIN TO ADMINS Tested and working in 4.2.1.

Was:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Updated to:

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.


Please mark 'Installed' if you are using this template edit. I will be happy to help if you are having problems getting it working.

Download Now

Only licensed members can download files, Click Here for more information.

Supporters / CoAuthors

Screenshots

Click image for larger version

Name:	screen1.png
Views:	772
Size:	3.7 KB
ID:	132017  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 22 Aug 2011, 07:04
tommyxv tommyxv is offline
 
Join Date: Feb 2005
FYI: This also works in 4.1.5 too.
Reply With Quote
  #3  
Old 24 Aug 2011, 20:55
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
 
Join Date: Jan 2002
Real name: Wayne
A couple of changes are needed...

In your first conditional, you need to close the <div> that aligns everything to the right.

In your second conditional, that should be != instead of ==. As written it shows the primary for the one you want to hide it with and doesn't show it on any others.
__________________
Wayne Luke
Get started with your own social network. Purchase and download vBulletin today.
Reply With Quote
  #4  
Old 25 Aug 2011, 00:35
tommyxv tommyxv is offline
 
Join Date: Feb 2005
Originally Posted by Wayne Luke View Post
A couple of changes are needed...

In your first conditional, you need to close the <div> that aligns everything to the right.

In your second conditional, that should be != instead of ==. As written it shows the primary for the one you want to hide it with and doesn't show it on any others.
Thanks for the looking at this edit. I added the closing </div>.

I am a little confused with the "!= instead of ==". I tried it but that caused the primary content widget to show on the index to all, and not on my other pages at all. For now I will leave it as is since it is working for me.

I did try using the <vb:elseif condition> and <vb:else /> to make it a bit cleaner, but it did not work.
Reply With Quote
  #5  
Old 25 Aug 2011, 18:23
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
 
Join Date: Jan 2002
Real name: Wayne
For the second issue, I guess it depends on what you put for x-name-here. I used my 1-box-office value as that is what my home page is called. So it only showed the primary content on the homepage without showing it elsewhere.

Good job though. Much better than my previous method which was to stick it in a widget area and then use CSS to hide that area.
__________________
Wayne Luke
Get started with your own social network. Purchase and download vBulletin today.
Reply With Quote
  #6  
Old 31 Aug 2011, 05:38
dbetanco dbetanco is offline
 
Join Date: Aug 2011
no idea about how to use this... sorry my comment.. i'm newbie. where i have to perform this steps???
Reply With Quote
  #7  
Old 01 Sep 2011, 06:27
tommyxv tommyxv is offline
 
Join Date: Feb 2005
Originally Posted by dbetanco View Post
no idea about how to use this... sorry my comment.. i'm newbie. where i have to perform this steps???

You are replacing the vbcms_content_section_page template with the code I have posted. The text in red are the variables in which you have to change as they are unique to your site.

Link me to your site so I can see your page names and we'll go from there.

Last edited by tommyxv; 01 Sep 2011 at 06:32.
Reply With Quote
  #8  
Old 21 Sep 2011, 13:29
pmflav1 pmflav1 is offline
 
Join Date: Feb 2008
Great stuff thankyou
__________________
AusGamersNetwork
Reply With Quote
  #9  
Old 10 Oct 2011, 00:13
tommyxv tommyxv is offline
 
Join Date: Feb 2005
Cool, thanks.
Reply With Quote
  #10  
Old 03 Nov 2011, 16:51
Jokorey Jokorey is offline
 
Join Date: Nov 2011
Awesome, thanks!
Reply With Quote
  #11  
Old 03 Nov 2011, 19:29
Jokorey Jokorey is offline
 
Join Date: Nov 2011
Hrm, I am having a problem, and not sure what is happening.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

As soon as I add any "OR 'X'" to the code, the "Primary Content" returns on the 1-home page. If I just have any of the pages listed singular, it's works as expected, hiding the PC on all the other pages that aren't listed.

The end result I am shooting for is to have the PC hidden on 1-home, and visible on all the others. Any ideas?
Reply With Quote
  #12  
Old 05 Nov 2011, 19:34
GamersChallenge GamersChallenge is offline
 
Join Date: Aug 2011
Originally Posted by Jokorey View Post
Hrm, I am having a problem, and not sure what is happening.


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

As soon as I add any "OR 'X'" to the code, the "Primary Content" returns on the 1-home page. If I just have any of the pages listed singular, it's works as expected, hiding the PC on all the other pages that aren't listed.

The end result I am shooting for is to have the PC hidden on 1-home, and visible on all the others. Any ideas?
I'm having the same problem.
Reply With Quote
  #13  
Old 28 Nov 2011, 19:11
Jokorey Jokorey is offline
 
Join Date: Nov 2011
Gamers - I was never able to get this particular solution to work, but Wayne_Luke's (over on vbulletin.com) is getting the job done for me - might check it out if you haven't.
Reply With Quote
  #14  
Old 18 Dec 2011, 16:07
GamersChallenge GamersChallenge is offline
 
Join Date: Aug 2011
thanks jokorey, I founded and it works.

so easy, how did I not think of that?

for anyone else looking for this you can find it here, https://www.vbulletin.com/forum/show...-in-a-section?
Reply With Quote
  #15  
Old 06 Jan 2012, 01:16
thejohnnybrown thejohnnybrown is offline
 
Join Date: Nov 2011
If (like me) all you want is to remove the primary content widget from all pages, just do this:

1) Find the vbcms_content_section_page template.

2) Enclose everything in between: <vb:comment> . . . </vb:comment> (comment it all out)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 10:08.

Layout Options | Width: Wide Color: