Topic Description

Started by Rudolf, January 03, 2007, 09:12:29 AM

Previous topic - Next topic

Rudolf

Link to Mod
Rate this Mod

*****************************************************
Topic description - Modification for SMF
version 1.1
© 2007, Rudolf Martincsek
*****************************************************
This mod adds a description field to the topics.

In the package file you downloaded you'll find a readme.html file. Consult with that file for more information.

Have fun!

Note:
Those of you trying to apply the 1.1.3 upgrade patch (the patch not the package) uninstall the mod before upgrading then reinstall. Download the current file from the mod page, to solve a small compatibility issue.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Moptop650

Installation on this mod fails.

Fatal error: require() [function.require]: Failed opening required '/www/110mb.com/g/r/e/e/n/b/a/n/greenbandits/htdocs/forums/Packages/temp/DB.php' (include_path='.:/usr/share/php') in /www/110mb.com/g/r/e/e/n/b/a/n/greenbandits/htdocs/forums/Sources/Packages.php on line 549

Sounds neat though  ;D

Assistance

installed and works as described ...ty

quick edit doesnt seem to work , it just hangs on loading....
~playing poker~

Rudolf

You should get some Javascript errors.
If you can post them, it would help. What version of SMF you're using and which browser?
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Greek

I get this error. Do you know why?

Rudolf

The file could be corrupted. Try redownloading the package.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Assistance

Quote from: Rudolf on January 04, 2007, 02:56:39 AM
You should get some Javascript errors.
If you can post them, it would help. What version of SMF you're using and which browser?
if ur refering to me, there was no errors, it just hangs on Loading .... the green bar, in FF
Compatible With: 1.1.1
Using version: 1.1.1
~playing poker~

Rudolf

Quote from: Assistance on January 04, 2007, 09:31:27 AM
if ur refering to me, there was no errors, it just hangs on Loading .... the green bar, in FF
Compatible With: 1.1.1
Using version: 1.1.1

Can you give me a link to a forum with a test account? Can be normal account, with ability to post and modify own posts.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Greek

Quote from: Rudolf on January 04, 2007, 05:53:43 AM
The file could be corrupted. Try redownloading the package.
Οk, I installed it without problems, but there is a small display problem, perhaps because I have enlarge my board's width.

There is a blangk "gap" on the right side now. I suppose that it's not something difficult to correct it, but I don't know where excactly I have to do the changes. Can you help?

Rudolf

Quote from: Greek on January 04, 2007, 12:05:00 PM
There is a blangk "gap" on the right side now. I suppose that it's not something difficult to correct it, but I don't know where excactly I have to do the changes. Can you help?
Probably an empty table cell.
In the Display.template.php of your theme find
<!-- //-Topic description MOD- Start -->
<tr class="titlebg" id="description_row" style="font-weight: normal; ',(empty($context['description']) ? 'display: none' : '') , '">
<td valign="middle" width="2%" style="padding-left: 6px;">
</td>
<td width="13%"></td>
<td valign="middle" width="85%" style="padding-left: 6px;" id="top_description">
', $txt['topic_description'], ': ', $context['description'], '
</td>
</tr>
<!-- //-Topic description MOD- End -->

post the block of code before that. Like 10-15 lines.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Greek

// Show the topic information - icon, subject, etc.
echo '
<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="border-bottom: 0;">
<tr class="catbg3">
<td valign="middle" width="2%" style="padding-left: 6px;">
<img src="', $settings['images_url'], '/topic/', $context['class'], '.gif" align="bottom" alt="" />
</td>
<td width="13%"> ', $txt[29], '</td>
<td valign="middle" width="85%" style="padding-left: 6px;" id="top_subject">
', $txt[118], ': ', $context['subject'], ' &nbsp;(', $txt[641], ' ', $context['num_views'], ' ', $txt[642], ')
</td>
</tr>

Rudolf

Somehow, something is wrong. The code you posted doesn't match the image.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Greek

Quote from: Rudolf on January 04, 2007, 04:00:27 PM
Somehow, something is wrong. The code you posted doesn't match the image.
Ops! You are right! By mistake I copied the code from the display.template of my testing forum.

This is the correct one:
// Show the topic information - icon, subject, etc.
echo '
<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="border-bottom: 0;">
<tr class="catbg3">
<td valign="middle" width="2%" style="padding-left: 6px;">
<img src="', $settings['images_url'], '/topic/', $context['class'], '.gif" align="bottom" alt="" />
</td>
<td width="13%"> ', $txt[29], '</td>
<td valign="middle" width="85%" style="padding-left: 6px;" id="top_subject">
', $txt[118], ': ', $context['subject'], ' &nbsp;(', $txt[641], ' ', $context['num_views'], ' ', $txt[642], ')
</td>
<td>
<form action="', $scripturl, '?action=search2;topic=', $context['current_topic'], '" method="post" style="margin: 0;">
<input type="text" name="search" value="" style="width: 120px;" />&nbsp;
<input type="submit" name="submit" value="Αναζήτηση στο θέμα(Search topic)" style="width: 25ex;" />
</form>
</td>
</tr>

@ngel

Works great.

How is it possible to change the font name, font size, ... ?  I think that the look is better if the size is smaller.

Thanks for hints and tips

Rudolf

In your style.css:
To modify the looks of the description in the topic display add:
Code (css) Select

#top_description
{
color: #abcdefg;
font-size: small;
}


To modify the looks on the board index, use
Code (css) Select

.topic_description
{
color: #abcdefg;
font-size: small;
}


Define the two styles according to your heart's desire. ;)
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

@ngel

Works great, thanks

Quote from: Rudolf on January 04, 2007, 04:46:29 PM
In your style.css:
To modify the looks of the description in the topic display add:
Code (css) Select

#top_description
{
color: #abcdefg;
font-size: small;
}


To modify the looks on the board index, use
Code (css) Select

.topic_description
{
color: #abcdefg;
font-size: small;
}


Define the two styles according to your heart's desire. ;)

mrselnombre

Quote from: Assistance on January 04, 2007, 01:16:06 AM
installed and works as described ...ty

quick edit doesnt seem to work , it just hangs on loading....
i'm getting this too...

error code
line: 64
char: 2
error: 'getElementsByTagName(...).0' is null or not an obect
code: 0
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Total Twaddle.

mrselnombre

#17
I'm also getting "8: Undefined index: description
File: /home/totaltwa/public_html/board/Sources/Post.php
Line: 1406" in the error logs

Also getting this error in the error log when someone uses quote, the quote still goes through though.

"Apply Filter: Only show the errors with the same message
Database Error: Table 'totaltwa_yabbse.smf_topics' doesn't exist
File: /home/totaltwa/public_html/board/Sources/Post.php
Line: 2097"
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Total Twaddle.

mrselnombre

I don't know if it helps, but i tried replacing the xml_topc.js and xml_board.js in the theme folder with a back up one, without the description mod in. And the problem still occurs.. (even emptied cache just in case)
Also the topic modify (on message index) doesn't work either.
(\__/)
(='.'=)This is Bunny. Copy and paste bunny into your
(")_(")signature to help him gain world domination.
Total Twaddle.

Rudolf

Yes there was an error in the database query, the prefix was hard coded. It causing you errors because you're using a different prefix for your tables.
Download again the package from the mod page (same version but it's updated).
The xml_board.js, and xml_topic.js file are needed for the quick edits to work, so if you're still having problems after the reinstall, we'll look into it. First make sure you have a clean install of the mod.
I will update all my mods in the next few weeks. Thanks for your patience.

SVG-Collapse (you need an SVG compliant browser)

Advertisement: