vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - Sidebar Anywhere (Formerly Sidebar for Activity Stream) by BOP5 (https://vborg.vbsupport.ru/showthread.php?t=283307)

djbaxter 07-12-2012 09:55 PM

1 Attachment(s)
Quote:

Originally Posted by Hippy (Post 2331746)
@ BirdOPrey5
cosmetically the sidebar is a tad high compared to the forum home
works perfect tho..
thanks

Quote:

Originally Posted by BirdOPrey5 (Post 2338722)
Looks like it is a little off (6 pixels) due to your custom style.

Go to plugin manager and edit the AS Sidebar Edits plugin.

Find the instance of:
Code:

42px
ans chabe it to

Code:

36px

This looks fine on a new custom style forum EXCEPT on forum home where it's too low. How can I move it up as in the second attached image?

PattiOz 07-12-2012 10:16 PM

1 Attachment(s)
Quote:

Originally Posted by BirdOPrey5 (Post 2347240)
1) That is by design- why add code to do something vbulletin already does itself?

2) Never heard of vertical collapse. The option to disable the one collapse I know of (best described as Horizontal) is in the mod settings: Show Collapse Button -> No.

1) point taken :)

2) The vertical collapse is attached. It is probably a global setting somewhere - it is the same collapse button as the forums. I just need to find out where it is and turn it off.

BirdOPrey5 07-13-2012 03:08 PM

Ahhh... those are collapses for each individual forum block. In my tests it is remembering individual collapsed blocks between pages which is good.

But I've never seen an option to disable them- do you have them disabled on the Forum Index sidebar somehow?

Looking at the various block_* templates...

This one for example:

Code:

<li>
        <div class="block smaller">
                <div class="blocksubhead">
                        <a class="collapse" id="collapse_block_html_{vb:raw blockinfo.blockid}" href="{vb:raw relpath}#top"><img alt="" src="{vb:stylevar imgdir_button}/collapse_40b.png" id="collapseimg_html_{vb:raw blockinfo.blockid}"/></a>
                        <span class="blocktitle">{vb:raw blockinfo.title}</span>
                </div>
                <div class="widget_content blockbody floatcontainer">
                <div id="block_html_{vb:raw blockinfo.blockid}" class="blockrow">
                        {vb:raw content}
                </div>
                </div>
        </div>
        <div class="underblock"></div>
</li>

The relevant code is in red. There is no conditional around it so I'm pretty sure no option exists to disable them.

[s]You would need to edit each block_ template and remove the code in red.[/s]

EDIT- Better solution in post #85

BirdOPrey5 07-13-2012 03:19 PM

Quote:

Originally Posted by djbaxter (Post 2347415)
This looks fine on a new custom style forum EXCEPT on forum home where it's too low. How can I move it up as in the second attached image?

My mod doesn't affect forum home (AKA forum index) at all.

Did it change after you installed this mod?

Igel1 07-13-2012 03:35 PM

Quote:

You would need to edit each block_ template and remove the code in red.
or write the following in the additional.css

Code:

#sidebar_container a.collapse {
display: none;
}


djbaxter 07-13-2012 05:17 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2347604)
My mod doesn't affect forum home (AKA forum index) at all.

Did it change after you installed this mod?

No. I was previously using Everywhere Sidebar which had the option of changing the positioning but that wasn't perfect on all pages. What I'm looking for is a way to change the forum home page sidebar and use your add-on for the other pages where it's perfect.

BirdOPrey5 07-13-2012 07:44 PM

Quote:

Originally Posted by djbaxter (Post 2347655)
No. I was previously using Everywhere Sidebar which had the option of changing the positioning but that wasn't perfect on all pages. What I'm looking for is a way to change the forum home page sidebar and use your add-on for the other pages where it's perfect.

Understood.

Edit your FORUHOME template.

Find the line:

Code:

<div id="content_container" class="{vb:raw $sidebar_class} <vb:if condition="$show['sidebarposition'] == 'left'">contentright</vb:if>">
change it to

Code:

<div id="content_container" class="{vb:raw $sidebar_class} <vb:if condition="$show['sidebarposition'] == 'left'">contentright</vb:if>" style="margin-top: -40px;">
Added code in red. Change -40 to a value that looks good for you.

djbaxter 07-14-2012 01:35 AM

^^^ Thank you.

djbaxter 07-15-2012 03:22 AM

Quote:

Originally Posted by Igel1 (Post 2347609)
or write the following in the additional.css

Code:

#sidebar_container a.collapse {
display: none;
}


This does not seem to disable the vertical collapse in either the default style or in my custom style. The "-" button is still visible and clickable and the entire sidebar collapses.



Correction: It DOES work but only if you add this to the TOP of additionalcss.css

What I added was this:

Code:

#sidebar_button_link {
display:none;
}

#sidebar_container a.collapse {
display: none;
}


BirdOPrey5 07-15-2012 08:09 AM

weird. You can use !important to force it to work anywhere-

Code:

display: none !important;

moonfox 07-15-2012 02:30 PM

Looks very nice!

I tried it but on my custom style I have sidebar width var set to 300px (because of ads I have that are that width). It works on forum home but on all other pages shows as the default 270px. Let me know if I am missing something.

I reverted to using everywhere sidebar. It has an option within the mod cp to set sidebar width.

moonfox 07-15-2012 03:01 PM

I am also getting the vertical collapse button in my custom style with your mod. I don't get this in ESB although I don't remember if I had to change anything to achieve this, and there is no setting in ESB mentioning it.

djbaxter 07-15-2012 03:58 PM

Quote:

Originally Posted by moonfox (Post 2348336)
I am also getting the vertical collapse button in my custom style with your mod. I don't get this in ESB although I don't remember if I had to change anything to achieve this, and there is no setting in ESB mentioning it.


Add the following to additionalcss.css

Code:

#sidebar_button_link {
display:none !important;
}

#sidebar_container a.collapse {
display: none !important;
}


karlm 07-15-2012 11:44 PM

Option in ACP for width would be good to implement in future release..cough cough :)

djbaxter 07-15-2012 11:59 PM

True. But that's not gonna help that cough of yours...

In the meantime:

AdminCP -> Style Manager -> Style Variable Editor -> Sidebar -> forum_sidebar_width

and repeat for cms and blog if you have the suite and use those elements.

BirdOPrey5 07-16-2012 09:58 AM

OK width will be picked up off the stylevar in the next version- will look into implemented a disable for vertical collapse as well.

tpearl5 07-16-2012 03:07 PM

BOP, would consider adding the ability to specify different blocks based on "THIS SCRIPT ="?

BirdOPrey5 07-16-2012 09:50 PM

Not likely to happen, no idea how that code works.

tpearl5 07-17-2012 06:53 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2348790)
Not likely to happen, no idea how that code works.

It's just the code that identifies what pages are what. For example, showthread, index, etc.

BirdOPrey5 07-17-2012 07:53 PM

My bad- I understand how "THIS_SCRIPT" works- that is in most of my mods. I meant in my programming of this mod I didn't come across anything that would let me choose which forum-blocks load per page. I know everywhere sidebar has that option but at this moment I don't know how I would begin to implement such an option- truth be told this is a fairly simple mod all things considered- I was not planning on complicating it by allowing per-script options.

SimonB 07-18-2012 10:01 AM

I have tried to add the sidebar on custom pages (or at least a page associated with another product)

In this case it is DownloadsII, which has a THIS_SCRIPT name defined as below

define('THIS_SCRIPT', 'downloads2');

So for the "custom" page I have the following in the config

register|register*30 <-- this was here originally
downloads2|smoothred

Now this is being ignored. So I assume it is because of the incorrect template name, which is actually Smooth Red. I have tried enclosing in quotes but this doesn't work either.

Is this a problem with the specified template name, or is the problem likely somewhere else?

Thanks

moonfox 07-18-2012 10:19 AM

Quote:

Originally Posted by djbaxter (Post 2348509)
True. But that's not gonna help that cough of yours...

In the meantime:

AdminCP -> Style Manager -> Style Variable Editor -> Sidebar -> forum_sidebar_width

and repeat for cms and blog if you have the suite and use those elements.

FYI - I am not able to change width. I am using custom style.

tpearl5 07-18-2012 12:56 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2349061)
My bad- I understand how "THIS_SCRIPT" works- that is in most of my mods. I meant in my programming of this mod I didn't come across anything that would let me choose which forum-blocks load per page. I know everywhere sidebar has that option but at this moment I don't know how I would begin to implement such an option- truth be told this is a fairly simple mod all things considered- I was not planning on complicating it by allowing per-script options.

gotcha :) No prob, I was just hoping to see something that is put together better ;)

wolfe 07-18-2012 06:22 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2347240)
1) That is by design- why add code to do something vbulletin already does itself?

it looks better when it shows up next to the shoutbox how can i make it work on the forums index i tried

index|forumhome now luck also tried FORUMHOME

BirdOPrey5 07-18-2012 08:12 PM

Quote:

Originally Posted by SimonB (Post 2349220)
I have tried to add the sidebar on custom pages (or at least a page associated with another product)

In this case it is DownloadsII, which has a THIS_SCRIPT name defined as below

define('THIS_SCRIPT', 'downloads2');

So for the "custom" page I have the following in the config

register|register*30 <-- this was here originally
downloads2|smoothred

Now this is being ignored. So I assume it is because of the incorrect template name, which is actually Smooth Red. I have tried enclosing in quotes but this doesn't work either.

Is this a problem with the specified template name, or is the problem likely somewhere else?

Thanks

Smooth Red sounds like the name of a style... I am certain the Template Name of downloads2 is not "smoothred."

To find out the template name go to Admin CP -> Settings -> Options -> General Settings -> Add Template Name in HTML Comments -> Yes

Now open the Downloads II page, and view the source in your web browser.

The first or second line will be something like:

Code:

<!-- BEGIN TEMPLATE: iframer_bop5_vb4 -->
In this example the template name is iframer_bop5_vb4. (An example from my IFRAMEr mod.)

Quote:

Originally Posted by moonfox (Post 2349222)
FYI - I am not able to change width. I am using custom style.

Custom width hasn't been implemented yet.

Quote:

Originally Posted by wolfe (Post 2349323)
it looks better when it shows up next to the shoutbox how can i make it work on the forums index i tried

index|forumhome now luck also tried FORUMHOME

To use it on Forum Index turn on the default vBulletin Forum Sideblock. It will be the same thing.

pete_brady 07-18-2012 10:23 PM

A quick request: Would it be possible to show / hide the sidebar collapse button based on group membership?

thecore762 07-18-2012 11:07 PM

Quote:

Originally Posted by pete_brady (Post 2349376)
A quick request: Would it be possible to show / hide the sidebar collapse button based on group membership?

At this point based on BOP5's last post I'd suggest putting this suggestion vBulletin's JIRA.

SimonB 07-19-2012 11:17 AM

Quote:

Originally Posted by BirdOPrey5 (Post 2349358)
Smooth Red sounds like the name of a style... I am certain the Template Name of downloads2 is not "smoothred."

DOH!!!! There is a phrase in my home country that, loosely translated, means "There ain't no pills for stupidity":erm::erm:

Yes, I had templates and styles confused

BirdOPrey5 07-19-2012 05:24 PM

Quote:

Originally Posted by pete_brady (Post 2349376)
A quick request: Would it be possible to show / hide the sidebar collapse button based on group membership?

I can probably add that in, yes. Next update.

pete_brady 07-19-2012 05:35 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2349589)
I can probably add that in, yes. Next update.

awesome, thanks

SimonB 07-20-2012 08:22 AM

For fear of asking another silly question, but why would my sidebar be on the right of the CMS section, but on the left in the activity and forum modules?

Looks to me like a vBulletin issue and not specifically one of this mod, but not sure..

EDIT, ok I understand the CMS doesn't use the LHS/RHS sidebar configuration at all and this is rather embedded in the grid structure... more work for me to do :)

BirdOPrey5 07-22-2012 01:22 PM

After further investigation it seems setting the width via the stylevar forum_sidebar_width does indeed work to re-size the sidebar width on all pages.

If that is not working for you please link me to an example page.

gedsta 07-22-2012 02:27 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2349589)
I can probably add that in, yes. Next update.

This would be a great addition.

I currently use the other coder's mod and so would be interested to see if yours provides any performance increase etc

pyes 07-31-2012 05:28 PM

this works great ty

BirdOPrey5 07-31-2012 08:38 PM

Quote:

Originally Posted by pyes (Post 2353101)
this works great ty

Thanks. If you are using it please "Mark as Installed" : https://vborg.vbsupport.ru/external/2013/09/18.jpg

Killhunter 08-03-2012 09:30 AM

@Bird: My suggestion for this mod: https://vborg.vbsupport.ru/showthrea...47#post2353847

BirdOPrey5 08-03-2012 01:37 PM

Quote:

Originally Posted by Killhunter (Post 2353967)

That wouldn't be a suggestion for this mod- that would be a separate forum sideblock that works as you request.

BGN64 08-03-2012 04:55 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2349589)
I can probably add that in, yes. Next update.

Quote:

Originally Posted by pete_brady (Post 2349376)
A quick request: Would it be possible to show / hide the sidebar collapse button based on group membership?

Add this and I'm in... tagged for now.

BirdOPrey5 08-03-2012 06:59 PM

Updated to version 2.1.0

Added option to prevent collapsing of sidebar by usergroup (including FORUMHOME sidebar)

If upgrading be sure to go back to the settings to set which usergroups have permission to collapse the sidebar. By default all the built in usergroups (besides banned) have permission.

Gemma 08-03-2012 07:34 PM

Thanks for the update :)


All times are GMT. The time now is 07:05 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01583 seconds
  • Memory Usage 1,848KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (11)bbcode_code_printable
  • (25)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete