Stick topics on sidebar

redwolf6

Member
Hello,

I have some important threads and I want them to be shown on the homepage, so I was wondering whether is it possible to stick them on the sidebar? So people could see them.

(I don't want them in the middle of the page because I am using latest threads mods).

Thanks :)
 
Are you trying to do a sort of announcement thing? I don't think there is a sticky topic widget, but if you aren't using the ad_sidebar templates, you can try to use those show important information on the sidebar. This will not populate automatically though.
 
1. Make a small template containing the links you want.
There's a link top right in the Appearance/ Templates page in admin.
Name it yourname_sidebarlinks using your personal name as 'yourname.' Makes it easy to find later for updating the links.

Rich (BB code):
<!-- XF STANDARD TYPE BLOCK -->
<div class="section" align="left">
<div class="secondaryContent">
<h3>TITLE OF SECTION TO APPEAR ON SIDEBAR</h3>
 
<!-- THREAD LINK ONE -->
<a href="http://mysite.com/XF-forum-folder/threads/threadname.NUMBER/" target="_blanK">TITLE VISITOR SEES</a><br />
 
<!-- THREAD LINK TWO -->
<a href="http://mysite.com/XF-forum-folder/threads/threadname.NUMBER/" target="_blanK">TITLE VISITOR SEES</a><br />
 
</div>
</div>

# Replace the items in red with stuff that fits your site, and your needs for links to threads.
# Get the links for the threads by copying from the address bar when you have its page open OR rightclick the thread title select Copy Link Location.
Paste the URL address in CAREFULLY - do not disturb the " " at each end of the model link given in red here (it won't show as red in your template so keep this open on another tab as you do it.)
# Copy and paste the line I show in bold - THREAD LINK TWO - to create a third link, or more. Change THREAD LINK TWO to THREE.
# Save your new template.

2. Make your template contents appear in the side menu.
Open the sidebar_online_users template. This controls the side menu on the front page of the forums.
# To open it put its name in the search box at top of Appearance/ Templates. Then click its name which appears in the big box below.


# Right at the bottom opf the template - scroll all the way down - paste in this snippet of code:
Code:
<xen:include template="shan_sidebar"></xen:include>
I think the last line you see is:
<!-- end block: sidebar_online_users -->
so you end up with:
Code:
<!-- end block: sidebar_online_users -->[/COLOR][/COLOR][/COLOR][/COLOR]
[COLOR=#000000][COLOR=#000000][COLOR=#000000]<xen:include template="[/COLOR][/COLOR][COLOR=#000000][COLOR=#000000][COLOR=#ff0000][B]yourname_sidebarlinks[/B][/COLOR]"></xen:include>
This tells the sidebar to include whatever stuff you put in your own template.

yourname_sidebarlinks MUST match the name you gave your new template EXACTLY.

3. To update your links list:
Go to Appearance/ Templates.
Use the search box at top of Appearance/ Templates. Put in your name! (Or put in the whole name of your template yourname_sidebarlinks)
Then click its name which appears in the big box below.
Make your alterations. Replace a URL and the title the visitor sees.
Or add a new one by copy/ pasting an existing one, and altering it.

3. To remove your links list:
Go to Appearance/ Templates.
Use the search box at top of Appearance/ Templates. Put in the search box at top sidebar_online_users template.

Change the last line:
Code:
<xen:include template="yourname_sidebarlinks"></xen:include>

to:

Code:
<xen:comment>
<xen:include template="yourname_sidebarlinks"></xen:include>
</xen:comment>

This means the whole thing is still there to reuse and adapt but it won't show to your visitors, because the connection between the side menu and your own template has been suspended.
 
ps. you can also put links in to other sites and their pages using the same method.

pss. You can add a bit of explanation like this:

Rich (BB code):
<!-- THREAD LINK ONE -->
<a href="http://mysite.com/XF-forum-folder/threads/threadname.NUMBER/" target="_blanK">TITLE VISITOR SEES</a> Explanation here - keep it brief.<br />
Note there is a space between the </a> (which closes the link) and the explanation wording.
 
Back
Top Bottom