News:

Wondering if this will always be free?  See why free is better.

Main Menu

RSS Feed Icon for boards

Started by SMFHacks.com Team, July 17, 2006, 01:41:27 PM

Previous topic - Next topic

Tanks

i am not 100% so please do a backup of your boardindex.template.php file

This is a reply for Gene Steinberg using the classic theme

add the code right after this code (before the <br /> tag)


<b>', $board['link'], '</b>

genesteinberg

Quote from: Knat on February 06, 2007, 02:08:58 PM
i am not 100% so please do a backup of your boardindex.template.php file

This is a reply for Gene Steinberg using the classic theme

add the code right after this code (before the <br /> tag)


<b>', $board['link'], '</b>


Now we're getting somewhere. This works.

Now is there a way to make one global RSS tag that covers the entire forum?

Peace,
Gene

chep

#82
QuoteNow is there a way to make one global RSS tag that covers the entire forum?

I put one in my "news"

Like this http://www.site.com/smf/index.php?action=.xml;type=rss;limit=20


genesteinberg

Quote from: chep on February 06, 2007, 10:13:44 PM
QuoteNow is there a way to make one global RSS tag that covers the entire forum?

I put one in my "news"

Like this http://www.site.com/smf/index.php?action=.xml;type=rss;limit=20


There is another thread I was on which mentioned that if you don't use www. then it sometimes does not work..

OK, wonderful, but can you deliver an icon on the board that contains that link, say on the main board name or something?

Peace,
Gene

chep

 ???
I don't understand exactly what you mean. It's not specific to any board. Just as you asked. If you want to
put some html and reference an image then try something like this:


<a href="http://www.site.com/smf/index.php?action=.xml;type=rss;limit=20"><img src="http://www.site.com/smf/Themes/default/images/rss.png" alt="feed" />&nbsp;Forum Feed</a>


Of course replacing the appropriate theme directory if necessary....

genesteinberg

Quote from: chep on February 06, 2007, 10:24:31 PM
???
I don't understand exactly what you mean. It's not specific to any board. Just as you asked. If you want to
put some html and reference an image then try something like this:


<a href="http://www.site.com/smf/index.php?action=.xml;type=rss;limit=20"><img src="http://www.site.com/smf/Themes/default/images/rss.png" alt="feed" />&nbsp;Forum Feed</a>


Of course replacing the appropriate theme directory if necessary....

OK, right now at techbroadcasting.com/smf, I have a separate RSS feed for each board.

What I'd also like to do is have one, along with the icon, for the entire forum. Make sense now?

Take a look at the board and you'll see what I'm getting at.

Peace,
Gene

chep

#86
Well I think I just supplied you with the info you need. It's up to you to decide where you want it.

http://techbroadcasting.com/smf/index.php?action=.xml;type=rss;limit=25

genesteinberg

Quote from: chep on February 06, 2007, 10:31:13 PM
Well I think I just supplied you with the info you need. It's up to you to decide where you want it.

http://techbroadcasting.com/smf/index.php?action=.xml;type=rss;limit=25


Check out this thread too --> http://www.simplemachines.org/community/index.php?topic=100074.msg943803#msg943803

OK, I'm not a PHP-type programmer, so I'd need to know where in the board templates to put this to have it appear, for example, the main title of the board, the navigation icons at the top, or whatever :)

My Webmaster right now is on hiatus so I'm struggling through this myself.

Peace,
Gene

chep

If you put it in with the navigation icons it will look out of place. IMHO.

I am busy with kids but can reply later or send pm...

genesteinberg

Quote from: chep on February 06, 2007, 10:44:42 PM
If you put it in with the navigation icons it will look out of place. IMHO.

I am busy with kids but can reply later or send pm...

Exactly. Replace the individual icons with just one, which covers it all :)

Peace,
Gene

chep

Can you send me a copy of your index.template.php

I don't know what theme you are using...

genesteinberg

Quote from: chep on February 06, 2007, 11:16:38 PM
Can you send me a copy of your index.template.php

I don't know what theme you are using...

I'll make it simple.

It's the standard Classic YaBB SE Theme, the one it ships with.

So I suppose any unaltered copy would be sufficient :)

Peace,
Gene

chep

#92
Try this - tested briefly  on my board... As I mentioned - I think it is a poor choice to place it there because it looks out of place. But if you changed it to another icon it might look better... I like it in the news section instead... Mostly because it is much easier to implement and edit there.


Look for this:

// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<a href="', $scripturl, '?action=login">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/login.gif" alt="' . $txt[34] . '" border="0" />' : $txt[34]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=register">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/register.gif" alt="' . $txt[97] . '" border="0" />' : $txt[97]), '</a>';
}
// Otherwise, they might want to [logout]...
else
echo '
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108] . '" border="0" />' : $txt[108]), '</a>';


Replace it with this:

// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<a href="', $scripturl, '?action=login">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/login.gif" alt="' . $txt[34] . '" border="0" />' : $txt[34]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=register">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/register.gif" alt="' . $txt[97] . '" border="0" />' : $txt[97]), '</a>
<a href="', $scripturl, '?action=.xml;type=rss;limit=25">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/rss.png" alt="' . 'Rss' . '" border="0" />' : 'Rss'), '</a>';
}
// Otherwise, they might want to [logout]...
else
echo '
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108] . '" border="0" />' : $txt[108]), '</a>
<a href="', $scripturl, '?action=.xml;type=rss;limit=25">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/rss.png" alt="' . 'Rss' . '" border="0" />' : 'Rss'), '</a>';


genesteinberg

Quote from: chep on February 06, 2007, 11:46:01 PM
Try this - tested briefly  on my board... As I mentioned - I think it is a poor choice to place it there because it looks out of place. But if you changed it to another icon it might look better... I like it in the news section instead... Mostly because it is much easier to implement and edit there.


Well, it doesn't seem to find the rss.png file, which is in the proper location. Am I missing something here?

Peace,
Gene

chep

#94
You'll have to be more specific. I cannot troubleshoot something for you otherwise. A location to where it "thinks the image is" would be a start. Otherwise it's just a vague description...

At any rate finding where it he image is should be a trivial move for you to overcome. You can just either copy it to the location where it isn't or make a small edit to the code... 

My psychic powers suggest that the languages folder [english] is the culprit.
. $context['user']['language']
That means I would try this (which basically removes the language folder from the equation):


// If the user is a guest, show [login] and [register] buttons.
if ($context['user']['is_guest'])
{
echo '
<a href="', $scripturl, '?action=login">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/login.gif" alt="' . $txt[34] . '" border="0" />' : $txt[34]), '</a>', $context['menu_separator'], '
<a href="', $scripturl, '?action=register">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/register.gif" alt="' . $txt[97] . '" border="0" />' : $txt[97]), '</a>
<a href="', $scripturl, '?action=.xml;type=rss;limit=25">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/rss.png" alt="' . 'Rss' . '" border="0" />' : 'Rss'), '</a>';
}
// Otherwise, they might want to [logout]...
else
echo '
<a href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/logout.gif" alt="' . $txt[108] . '" border="0" />' : $txt[108]), '</a>
<a href="', $scripturl, '?action=.xml;type=rss;limit=25">', ($settings['use_image_buttons'] ? '<img src="' . $settings['images_url'] . '/rss.png" alt="' . 'Rss' . '" border="0" />' : 'Rss'), '</a>';


genesteinberg

Quote from: chep on February 07, 2007, 03:55:21 AM
You'll have to be more specific. I cannot troubleshoot something for you otherwise. A location to where it "thinks the image is" would be a start. Otherwise it's just a vague description...

At any rate finding where it he image is should be a trivial move for you to overcome. You can just either copy it to the location where it isn't or make a small edit to the code... 

My psychic powers suggest that the languages folder [english] is the culprit.

It was in the images folder, but what you did fixed it.

Thanks for all the effort. I do appreciate it.

Check www.techbroadcasting.com/smf for the result.

Peace,
Gene

chep

Cool.

I noticed there was a button generator. The generator is missing the RSS feed icon. However maybe you can contact the web page owner and see if it isn't too much of an inconvenience to add one for you. A bonafide button would make it look good.

http://www.yabb.nl/buttongenerator/generator19/index.php

genesteinberg

Quote from: chep on February 07, 2007, 01:01:42 PM
Cool.

I noticed there was a button generator. The generator is missing the RSS feed icon. However maybe you can contact the web page owner and see if it isn't too much of an inconvenience to add one for you. A bonafide button would make it look good.

http://www.yabb.nl/buttongenerator/generator19/index.php

Wonderful. I wrote to the owner and asked for that button :)

Thanks again for all the help.

chep


genesteinberg

Quote from: chep on February 09, 2007, 03:04:28 AM
Looks like you got it

Yes, it worked. He can't duplicate it exactly, but we came close.

Advertisement: