• Welcome to Simple Machines Community Forum. Please login or sign up.
November 30, 2021, 11:08:07 PM

News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord


Images On Board

Started by Bulakbol, June 23, 2008, 05:19:47 PM

Previous topic - Next topic

Rap4Life

Quote from: JohnyB on October 16, 2008, 07:41:18 PM
@Rap4Life
Re: Extreme 6 theme. Edit extreme6/BoardIndex.template.php
Code (find) Select
<td class="windowbg2">
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />


Code (replace) Select
<td class="windowbg2">';
if (!empty($board['image']))
{
echo '<div style="float:left; margin-right: 4px;">';
if (!empty($board['img_link']))
echo '<a href="', $board['img_link'], '" target="_blank"><img src="' . $settings['default_images_url'] . '/ImagesOnBoard/' . $board['image'] . '" alt="', $board['img_link'], '" />';
else
echo '<a href="', $board['href'], '" name="b', $board['id'], '"><img src="' . $settings['default_images_url'] . '/ImagesOnBoard/' . $board['image'] . '" alt="', $board['name'], '" />';
echo '</a></div>';
}

echo '
<b><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a></b><br />



i did the change but i still can't see any new option in the forum edit panel \=

is there any change that need to be done with some admin files?

and thanks!

Bulakbol

@Rap4Life
Did you install the mod? Attach your edited BoardIndex.template.php and I'll try to fix it.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Rap4Life

October 19, 2008, 09:39:16 AM #282 Last Edit: October 19, 2008, 09:42:18 AM by Rap4Life
Quote from: JohnyB on October 18, 2008, 10:22:17 PM
@Rap4Life
Did you install the mod? Attach your edited BoardIndex.template.php and I'll try to fix it.

yes... i install it.


Bulakbol

Rap4Life
Your BoardIndex.template is fine. If there's no text box when you modify a board, then it's not probably installed properly. Check your ManageBoards.template.php and see if the following lines are there.
<textarea name="desc" rows="2" cols="29">', $context['board']['description'], '</textarea>
</td>
</tr><tr>
<td>
<strong>', $txt['board_image'], ':</strong><br />
<span class="smalltext">', $txt['board_image_desc'], '</span><br />
</td>
<td valign="top" align="right">
<input type="text" name="img_filename" value="', $context['board']['image'], '" size="30" />
</td>
</tr><tr>
<td>
<strong>', $txt['board_img_link'] , ':</strong><br />
<span class="smalltext">',$txt['board_img_link_desc'], '</span><br /><br />
</td>
<td valign="top" align="right">
<input type="text" name="img_link" value="', $context['board']['img_link'], '" size="30" />


Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Rap4Life

Quote from: JohnyB on October 19, 2008, 11:21:26 PM
Rap4Life
Your BoardIndex.template is fine. If there's no text box when you modify a board, then it's not probably installed properly. Check your ManageBoards.template.php and see if the following lines are there.
<textarea name="desc" rows="2" cols="29">', $context['board']['description'], '</textarea>
</td>
</tr><tr>
<td>
<strong>', $txt['board_image'], ':</strong><br />
<span class="smalltext">', $txt['board_image_desc'], '</span><br />
</td>
<td valign="top" align="right">
<input type="text" name="img_filename" value="', $context['board']['image'], '" size="30" />
</td>
</tr><tr>
<td>
<strong>', $txt['board_img_link'] , ':</strong><br />
<span class="smalltext">',$txt['board_img_link_desc'], '</span><br /><br />
</td>
<td valign="top" align="right">
<input type="text" name="img_link" value="', $context['board']['img_link'], '" size="30" />




i install it manually... and the above code dosen't apper in the ManageBoards.template.php file.

Bulakbol

@Rap4Life
Try the attached copy.

Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

Rap4Life

Quote from: JohnyB on October 20, 2008, 08:19:34 PM
@Rap4Life
Try the attached copy.



finaly!!!
thanks alot!
works like a charm.

jaimemarco

Hello JohnyB , I´ve the same problem like Lamarck, when I try to access to the ACP in boards, appear
a message:
Unknown column 'b.img_link' in 'field list'
how can i solve it!!?? Thanks a lot for your time!

peterinwa

October 26, 2008, 04:15:51 PM #288 Last Edit: October 27, 2008, 06:24:51 PM by peterinwa
After a lot of struggling and a lot of help from Kat, I got this mod working. It's great, and I really appreciate it. But I have one question.

It works for me when I put the image I want to display in:

Themes/default/images/ImagesOnBoard

and enter the name of the image in the first of the two fields the mod provides.

My question then is what is the second (link) field for?

I had hoped I could just enter the URL for the image there so I wouldn't have had to duplicate all the images and put them in the ImagesOnBoard folder.

Could someone please explain the purpose of the TWO fields?

Thanks so much,

Peter
Here's my forum:  www.MySchnauzer.net/forums

Bulakbol

Sorry for the late reply. I was offline for few days.

@Rap4Life
You are welcome. Thank you too for using or trying this mod.  8)

@jaimemarco
Not sure why the mod didn't add column to your table. Add the field manually via MyPhpAdmin if you can do it. I'll change the code when I have time. Sorry about that.

@peterinwa
The purpose of the second link is if you want to redirect your members somewhere when they click on the image.  It is optional.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

peterinwa

Quote@peterinwa
The purpose of the second link is if you want to redirect your members somewhere when they click on the image.  It is optional.

Oh, that's a great feature. And it seems obvious... in hindsight. Sorry if it said that somewhere and I missed it. I've never done a mod before.

Though actually I'm leaving it blank and it takes me right into the board which is just what I want.

Thanks... the mod makes my board look much more interesting!

Peter
Here's my forum:  www.MySchnauzer.net/forums

leonardus

QuoteNot sure why the mod didn't add column to your table. Add the field manually via MyPhpAdmin if you can do it. I'll change the code when I have time. Sorry about that.

can you help me to add manually the field in my php amdmin?

My error is:

Colonna sconosciuta 'b.img_link' in 'field list'
File: /users/l/a/r/larabafenice/public_html/Sources/Subs-Boards.php
Riga: 1048


Bulakbol

October 31, 2008, 10:59:42 PM #292 Last Edit: November 12, 2008, 05:39:11 PM by JohnyB
@peterinwa
Few people requested the feature. It's there if needed.

@leonardus
Here's a php file that will add the img_link column. Upload the file to your root directory via FTP and use your browser to run it.  Run it once only. Delete it after.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

tyhgdgh

2. Execute Modification ./Sources/MessageIndex.php Test failed
3. Execute Modification ./Sources/BoardIndex.php Test successful
4. Execute Modification ./Sources/ManageBoards.php Test successful
5. Execute Modification ./Themes/default/ManageBoards.template.php Test successful
6. Execute Modification ./Themes/default/MessageIndex.template.php Test failed
7. Execute Modification ./Themes/default/BoardIndex.template.php Test failed


I tried to find, but they cant be found, can you do it for me?


leonardus

Quote from: JohnyB on October 31, 2008, 10:59:42 PM
@leonardus
Here's a php file that will add the img_link column. Upload the file to your root directory via FTP and use your browser to run it.  Run it once only. Delete it after.

here is one error...
Fatal error: Call to undefined function db_query() in /users/l/a/r/larabafenice/public_html/uno.php on line 10

can you help me again?

lapinette

Nice mod!

Here's the chinese translation, hope it does useful.


<?php
// Version: 1.1; Modifications
$txt['board_image'] = '这个板块的图片名称';
$txt['board_image_desc'] = '包括扩展名. (比如. xx.gif)';
$txt['board_img_link'] = '以上图片的链接';
$txt['board_img_link_desc'] = '(例如.. http://www.simplemachines.org)';
?>

SISPro

Hope you can help me out on this one.

Error I am getting.


Database Error

Unknown column 'b.img_link' in 'field list'
File: /home2/ac919h/public_html/Sources/Subs-Boards.php
Line: 1031


Theme I am using. - BK-SMF-Dark-2.0B4

No mods at all installed this is the first mod.

Quote from: JohnyB on October 31, 2008, 10:59:42 PM
@peterinwa
Few people requested the feature. It's there if needed.

@leonardus
Here's a php file that will add the img_link column. Upload the file to your root directory via FTP and use your browser to run it.  Run it once only. Delete it after.

I try to install that file but get this error when I try

Fatal error: Call to undefined function db_query() in /home2/ac919h/public_html/add_img_link.php on line 10


Bulakbol

@leonardus and SISPro
Try this one (add_img_link_2b4.php) then. Delete it after running.

@lapinette
Thanks for the translation. If my text editor will handle the characters, I will add the translation to the next update.
Please do not PM me for support · My Mods and Theme · SMF Coding Guidelines · Modifications Approval Guidelines

SISPro

that worked thank you for this

SISPro

ok got a problem i have tried to upload a image to the default folder and it won't let me all my folders have my name on them but this one has user 99 and telling i don't have access to it. can you tell me what is going on here.


Advertisement: