Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=606)
Rate this Mod (http://custom.simplemachines.org/mods/index.php?action=review;sa=add;mod=606)
*****************************************************
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.
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
installed and works as described ...ty
quick edit doesnt seem to work , it just hangs on loading....
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 get this error. Do you know why?
The file could be corrupted. Try redownloading the package.
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
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.
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?
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.
// 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'], ' (', $txt[641], ' ', $context['num_views'], ' ', $txt[642], ')
</td>
</tr>
Somehow, something is wrong. The code you posted doesn't match the image.
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'], ' (', $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;" />
<input type="submit" name="submit" value="Αναζήτηση στο θέμα(Search topic)" style="width: 25ex;" />
</form>
</td>
</tr>
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
In your style.css:
To modify the looks of the description in the topic display add:
#top_description
{
color: #abcdefg;
font-size: small;
}
To modify the looks on the board index, use
.topic_description
{
color: #abcdefg;
font-size: small;
}
Define the two styles according to your heart's desire. ;)
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:
#top_description
{
color: #abcdefg;
font-size: small;
}
To modify the looks on the board index, use
.topic_description
{
color: #abcdefg;
font-size: small;
}
Define the two styles according to your heart's desire. ;)
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
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"
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.
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.
o.k getting this error now when quoting
"Database Error: Table 'totaltwa_yabbse._topics' doesn't exist
File: /home/totaltwa/public_html/board/Sources/Post.php
Line: 2097"
this when posting
"8: Undefined variable: form_description
File: /home/totaltwa/public_html/board/Sources/Post.php
Line: 948"
and
"8: Undefined index: description
File: /home/totaltwa/public_html/board/Sources/Post.php
Line: 1404"
fast edit still not working..
I'm being a bit slow today, and I messed up again.
Anyway, the database error shouldn't cause the other errors. Some changes are not made when you install the mod. Which is strange.
A link to your forum would help a lot though.
http://www.totaltwaddle.co.uk/board.
the error is only in the error log, so the quote is actually working..
the onlything that doesn't work at all is the fast edits.
8: Undefined index: description
File: /home/valleyof/public_html/forum/Sources/Post.php
Line: 1382
From my error log...
Quote from: mrselnombre on January 07, 2007, 09:18:53 AM
http://www.totaltwaddle.co.uk/board.
the error is only in the error log, so the quote is actually working..
the onlything that doesn't work at all is the fast edits.
Please re-download the mod again, this time it should work.
Quote from: Ninoslav on January 07, 2007, 10:23:17 AM
8: Undefined index: description
File: /home/valleyof/public_html/forum/Sources/Post.php
Line: 1382
From my error log...
Can you track down to what causes the error? What are you doing when it happens?
Inline modify (fast edit) works now. thank you
the quote error has gone too, brilliant, thank you.
the only error remaining is the undefined index one
http://www.totaltwaddle.co.uk/board/index.php?action=post2
8: Undefined index: description
File: /home/totaltwa/public_html/board/Sources/Post.php
Line: 1406
http://www.totaltwaddle.co.uk/board/index.php?action=post2
8: Undefined index: description
File: /home/totaltwa/public_html/board/Sources/Post.php
Line: 1404
only happens when posting i think
ok, here it is:
when clicking on "new topic":
8: Undefined variable: form_description
File: D:\! Server\xampp\htdocs\newsmf\Sources\Post.php
Line: 938
when replying to that post:
8: Undefined variable: form_description
File: D:\! Server\xampp\htdocs\newsmf\Sources\Post.php
Line: 938
Hm, and the previous error i got on my live server, sorry but can't recreate what were users doing at the time..
mods on live server:
Users Online Today Mod
Reg Bar
SMF Staff Page
i still get the new topic one too
Yes, that's an error that I corrected but somehow creeped back, probably I edited the wrong files.
I can't reproduce the 'description' error.
I fixed the package... again :-[
Quote from: mrselnombre on January 07, 2007, 11:15:44 AM
i still get the new topic one too
What do you mean?
He ment that he is still getting the "new topic error" too, if i'm right!
So, should we dowload it again? Or what?
Yes you should. Sorry about that.
If you download again it will get rid of the undefined $form_description error.
The other one I'm not sure, I can't reproduce it it.
Ok :)
Third's a charm! Let's see now :)
never mind, you got it..
i'll try it again..
p.s
i'm a she ;)
o.k the error from a new topic is gone..
thank you.
Seems you've got it now...
just one little question... or perhaps a bug?
when I click on quick edit does it suppose to say "%description%"?
After I edit that and save, quick edit doesn't seem to be working anymore?! An description is gone!
This is for new topics! Editing old ones doesn't give me %description%.
EDIT:
Now i get the
8: Undefined index: description
File: /home/valleyof/public_html/forum/Sources/Post.php
Line: 1382
error!
Ok, i think i can locate it now...
These are the steps that lead to description error
1) find an old topic
2) edit & add a description
3) everytime someone replies, you'll get the error
i have to disagree.. i get the error whether it is an old and new topic with description or not.
i don't have the same problem with quick edit either. It works fine, and thats on topics with descriptions too.
Ok, I found only one way to get the error. Sure there are more.
And as for the quick edit issue, i lack the problem now... strange...
And sorry 'bout the mismatch in gender area...
Quote from: Ninoslav on January 07, 2007, 12:19:36 PM
And sorry 'bout the mismatch in gender area...
it's o.k.. i can take it :)
Quote from: Ninoslav on January 07, 2007, 11:59:52 AM
Now i get the
8: Undefined index: description
File: /home/valleyof/public_html/forum/Sources/Post.php
Line: 1382
error!
how do I solve this problem?Excuse my English, I am Italian
i don't think thats been figured out yet.
also getting that error for code earlier in the file too
8: Undefined index: description
File: /home/totaltwa/public_html/board/Sources/Post.php
Line: 454
8: Undefined index: description
File: /home/totaltwa/public_html/board/Sources/Post.php
Line: 387
I have no idea whatsoever. Whatever I do I can't make this error to appear.
I posted, crossposted, edited, quickedited everything, but still nothing.
Considered going from scratch? This is a great idea, and wouldn't want this go to waste... maybe asking for help from coders?
Quote from: Ninoslav on January 11, 2007, 03:54:44 AM
Considered going from scratch? This is a great idea, and wouldn't want this go to waste... maybe asking for help from coders?
I can't fix something that I don't see.
Earlier you said
Quote from: Ninoslav on January 07, 2007, 12:19:36 PM
Ok, I found only one way to get the error. Sure there are more.
but you never said what that way is.
I'm helpless here, for me it works fine and without errors.
Quote from: Rudolf on January 11, 2007, 07:15:58 AM
Quote from: Ninoslav on January 11, 2007, 03:54:44 AM
Considered going from scratch? This is a great idea, and wouldn't want this go to waste... maybe asking for help from coders?
I can't fix something that I don't see.
Earlier you said
Quote from: Ninoslav on January 07, 2007, 12:19:36 PM
Ok, I found only one way to get the error. Sure there are more.
but you never said what that way is.
I'm helpless here, for me it works fine and without errors.
Sorry but I am not the only one to which from mistake and the installed on two spaces with various servers (always SMF 1.1.1). Something there will be to give this mistake, I have the full log of the mistakes in both!
Excuse my English, I am Italian
Help please! :'(
Found the error, and updated the mod. Reinstall it.
It beats me why no one thought of saying that it happens when you post from the quick reply. I never use it and it didn't passed in my mind to check it. It's a non-function for me. I asked many times how to reproduce, but "I have the error too" and "I still have the error" answers don't help me.
Anyway, it should be fixed now.
i didn't realise thats what it was, i rarely use the long reply, and i have so many members posting all the time that it escaped my notice.
Sorry about that
Quote from: Rudolf on January 14, 2007, 06:14:47 AM
Found the error, and updated the mod. Reinstall it.
Thanks!
How can I change the maximum characters lenght?
it works perfect now!
Any examples of forum using this mod?
Max
DEMO www.webinweb.net
I uninstalled the version 1.0 and try to install the version 1.1
I've an error "Fail Test" in "Display.template.php"
So I reinstalled the version 1.0 and this version is OK
The 1.1 version seems to be working flawlessly :)
Thank you very much!
Very good mod thank you ;)
I think that I have located this error
Quote8: Undefined index: description
File: /home/mydomain/public_html/forum/Sources/Post.php
Line: 1404
This happens when somebody uses the quick reply.
How can I fix this?
The version that is available on the mod site is the latest, where this has been fixed.
Reinstalling the mod.
Hhhmmm... A little hard for me to do this. After so many mods that I have installed, it's impossible to unistall your mod.
Is there any possibiliy to do manually the needed change in code? And if yes, where?
Thanks.
Hi...did i find a typo ? i get the following error
Quote./Themes/default/Xml.template.php File not found
my file is named with a small "x"
xml.template.php
Quote
<file name="$themedir/Xml.template.php">
<operation>
<search position="before"><![CDATA[<subject><![CDATA[', $context['message']['subject'], ']]]]>><![CDATA[</subject>]]></search>
<add><![CDATA[
<description isfirst="',empty($context['message']['is_first_post']) ? '0' : '1','"><![CDATA[', $context['message']['description'], ']]]]>><![CDATA[</description>]]></add>
</operation>
That's Xml.template.php.
thats the strangest thing ever...wonder how that was renamed on me !! just checked a fresh download of the default Xml.template.php and its named with a capital X unlike mine with a small x !! weird
and that actually fixed another prob i was having...lol the post preview stopped working a while back and is all good again :)
Mod don't show descriptions in recent posts, unread topics and unread replies.
Quote from: digger on April 14, 2007, 07:42:32 PM
Mod don't show descriptions in recent posts, unread topics and unread replies.
I don think thats supported but i do would like to see this as well.
I had to do a fresh install of my board and mods, I came to this mod and now I get an test failed on the Display Template.
These are the Mods I have installed.
1. TinyPortal 0.983 [ Uninstall ]
2. SMF Arcade 2.0.7 [ Uninstall ]
3. SMFShop 3.0 [ Uninstall ]
4. SMF Arcade Shop Mod 1.0.0 [ Uninstall ]
5. SMF Arcade Trophies Mod 1.1.1 [ Uninstall ]
6. SMFPets 0.0 [ Uninstall ]
7. SMFPets Pets 0-1 Update 0.1 [ Uninstall ]
8. VisualWarning 1.32 [ Uninstall ]
9. Active Members In Topic 1.5 [ Uninstall ]
10. Bear Tabs 1.0 [ Uninstall ]
11. Color Bar 2.0 [ Uninstall ]
12. Member Awards 1.0.2 [ Uninstall ]
13. Membergroup Color Legend 1.0 [ Uninstall ]
14. Profile Music 1.0 [ Uninstall ]
15. Reason For Editing Mod 1.14 [ Uninstall ]
16. SMF Quick Theme Changer 1.0.0 [ Uninstall ]
17. Spoiler Tag 0.3.1 [ Uninstall ]
18. Users Online Today Mod 1.4.0
Can someone possibly help me. Also, here is my Display Template Code just in case. I attached it.
I tried doing it manually, I edited the Display Template and reuploaded it, then tried installing the mod again and still got test failed.
Thanks
The install test will fail even if you manually apply the changes before. Doing so it's even worst.
What you should do is apply the mod, then look at the Display.template.php and see which changes were not applied, and apply it.
Attach the Display.template.php after installing the mod and I'll take a look at it. Which theme you are using?
Quote from: digger on April 14, 2007, 07:42:32 PM
Mod don't show descriptions in recent posts, unread topics and unread replies.
I'll see what can I do about this.
Quote from: Rudolf on April 15, 2007, 04:09:20 AM
The install test will fail even if you manually apply the changes before. Doing so it's even worst.
What you should do is apply the mod, then look at the Display.template.php and see which changes were not applied, and apply it.
Attach the Display.template.php after installing the mod and I'll take a look at it. Which theme you are using?
Worked perfectly. Thanks Rudolph. I am using the Default SMF Theme.
I am just starting to understand how to manually edit theme files. So if I install a mod and it fails, I should install it, then manually make any changes that it didn't take?
Quote from: PixieWAttitude on April 15, 2007, 10:57:53 AM
I am just starting to understand how to manually edit theme files. So if I install a mod and it fails, I should install it, then manually make any changes that it didn't take?
Most of the time yes.
When you uninstall, just make sure that you manually remove what's left from the mod.
Thanks Rudolph
I now get an error when I go back into a topic after I added the part that was missing which was
Quote<!-- //-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 -->
The line right before that is
Quoteif (!empty($settings['display_who_viewing']))
Any ideas?
What kid of error you get?
The code modified is
';
if (!empty($settings['display_who_viewing']))
You have to add the mod's code before the <b>';</b> in the line before the <b>if</b> line.
Done correctly
</tr>';
if (!empty($settings['display_who_viewing']))
becomes
</tr>
<!-- //-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 -->';
if (!empty($settings['display_who_viewing']))
Ok. In the XML file it states to add after and you have it before. And I was also missing the </tr> tag as well. It worked :) The error message I was getting was that there was a Syntax error on line 227-228
Quote<file name="$themedir/Display.template.php">
<operation>
<search position="after">
<![CDATA[
';if (!empty($settings['display_who_viewing']))
]]></search>
<add><![CDATA[
<!-- //-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 -->
]]></add>
</operation>
I have installed in an spanish language template and it works OK.
The only small bug I have is that I can´t see the "Comment" text label.
I only see ":" and the edit box, but not the title label...
Where can I fix it?
Thanks
I'm very keen on installing this mod, but as a new SMFer I have no idea how to beat the error that the test gives me. Can I attach the file so you can take a look at my ./Themes/default/Display.template.php file as well? I know nothing how to fix this. After taking a look at the package myself I gave up. I have no intention whatsoever to mess with garbled xml files. That's one thing I'm 110% against.
Try this link: http://www.simplemachines.org/community/index.php?topic=140034.0 to view the package.
My bet would be to install the mod, then go and perform the changes in display.template.php manually.
If the above link doesn't helps you, you can attach the file (after you installed the mod) and I'll have a look at it.
Quote from: ArkServer on April 14, 2007, 07:56:32 PM
Quote from: digger on April 14, 2007, 07:42:32 PM
Mod don't show descriptions in recent posts, unread topics and unread replies.
I don think thats supported but i do would like to see this as well.
What about it?
Hello,
I have seen your mod in action and I think its a great addition. Though in my forums it looks like this:
Subject:[place where you input subject]
Blank Space :[place where you input Description]
Other than it not titleing the box it works great.
any help would be greatly appreciated
Thanks
2b
Probably you are not using the english language or you're using UTF encoding.
In either case, open up index.your_language.php or the UTF equivalent and add before the closing ?> line:
$txt['topic_description'] = 'Description'; //-Topic description MOD-
Thank you
I will try it later I cant edit that file from here. Though I think that is the fix I need for alot of Menu items of the sort that dont show. Almost every MOD I add it has that type of issue ie doest list in the admin menu just blank spots.
Edit: I just check that file for the $txt string and it is in there.
Edit 2: I checked the UTF8 file and added it there and it fixed it.
Help please! I have SMF 1.1.3! Topic Description does not work!
Quote from: opery on June 27, 2007, 11:01:18 AM
Help please! I have SMF 1.1.3! Topic Description does not work!
yes, tat xml_topic.js file conflicts. you may add the mod manually or need to wait for 1.1.3 update.
i m waiting for the update :D
I have updated the package.
I kept the version number because nothing is changed.
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.
Quote from: Rudolf on June 27, 2007, 01:36:49 PM
I have updated the package.
I kept the version number because nothing is changed.
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.
Thanks
The problem with xml_topic.js is resolved BUT I've a problem with display.template.php.
It seems that the code in <operation>
<search position="before"><![CDATA[<textarea cols="75" rows="7" style="width: 95%; height: 100px;" name="message" tabindex="1"></textarea><br />]]></search>
<add><![CDATA[
<input type="hidden" name="description" value="" readonly /><!-- //-Topic description MOD- -->]]></add>
</operation>
is not present in my "display.template.php"
Quote from: @ngel on June 28, 2007, 05:52:08 PM
The problem with xml_topic.js is resolved BUT I've a problem with display.template.php.
It seems that the code in <operation>
<search position="before"><![CDATA[<textarea cols="75" rows="7" style="width: 95%; height: 100px;" name="message" tabindex="1"></textarea><br />]]></search>
<add><![CDATA[
<input type="hidden" name="description" value="" readonly /><!-- //-Topic description MOD- -->]]></add>
</operation>
is not present in my "display.template.php"
Replace it with
<operation>
<search position="before"><![CDATA[<textarea cols="75" rows="7" style="width: 95%;" name="message" id="message" tabindex="1"></textarea><br />]]></search>
<add><![CDATA[
<input type="hidden" name="description" value="" readonly /><!-- //-Topic description MOD- -->]]></add>
</operation>
i can i install this hack into 1.1.3 ?
Quote from: GhoXt on June 28, 2007, 06:17:51 PM
i can i install this hack into 1.1.3 ?
You can read this topic from Reply #83
There are no issues with 1.1.3 AFAIK. It installs fine, and should not cause any errors.
The upgrade is a little rough, because the two packages are conflicting over a small thing.
i tried to install and after i click "install" appeared this
Fatal error: require() [function.require]: Failed opening required '/home/madleiloex/domains/pmteam.org/public_html/umfo/Packages/temp/./DB.php' (include_path='.:/usr/local/lib/php') in /home/madleiloex/domains/pmteam.org/public_html/umfo/Sources/Packages.php on line 552
The package wasn't extracted correctly, which is weird.
Do you have the temp folder and file in it?
hi again i follow the path and no temp folder :| wtf ? ../Packages/all pakages here no temp folder
Create manually the temp folder and make sure that it is writable.
ok mate its installed i think, appeared installed.
well where should appear the confg to this hack at admin panel ? i dont see anything :S
Quote from: Rudolf on June 27, 2007, 01:36:49 PM
I have updated the package.
I kept the version number because nothing is changed.
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.
Thanks, been waiting for that.
Quote from: Nanuciao on January 15, 2007, 05:46:20 PM
Any examples of forum using this mod?
Max
is there? screenshot would be appreciate...
I have a question on installation w/ this mod. Basically, I have problems w/ my server and I have to install all mods manually...
When opening up the themes.xml file, there is a line of code which says:
<file name="$themedir/Post.template.php">
<operation><search position="before"><![CDATA[
"subject"
]]></search>
<add><![CDATA[
, "description"
]]></add></operation>
The problem, is that there are multiple instances of "subject" in the file Post.template.php. Which one do I replace, or do I replace all of them?
Ok I'm having problems with the file xml.template.php as well. I can't seem to find the string: ', $context['message']['subject'], ']]]]>><![CDATA[</subject>, either. Can someone help me work this out?
The Post.template.php you have to add only after the first occurance.
On the line that says
var textFields = ["subject", "message", "icon", "guestname", "email", "evtitle", "question", "topic"];
You have to replace ]]]]>><![CDATA[
with ]]>
so on that line you have to search for
<subject><![CDATA[', $context['message']['subject'], ']]></subject>
And add after
<description isfirst="',empty($context['message']['is_first_post']) ? '0' : '1','"><![CDATA[', $context['message']['description'], ']]></description>
There are other similar operations, where you have to use the same logic.
The reasons behind is a bit hard to explain.
Now I'm having problems with this section of Sources.xml. With both Sources.xml and Themes.xml, I had to reformat each file so I could read them easily, so I suppose it's possible I could've accidentally deleted a character or two.
In Sources.xml, there's a section that goes:
<operation><search position="after"><![CDATA[
if (empty($post_errors))
]]></search>
<add><![CDATA[
//-Topic description MOD- Start
if (isset($_POST['description']))
{
$_POST['description'] = strtr($func['htmlspecialchars']($_POST['description']), array("\r" => '', "\n" => '', "\t" => ''));
// Maximum number of characters.
if ($func['strlen']($_POST['description']) > 200)
$_POST['description'] = addslashes($func['substr'](stripslashes($_POST['description']), 0, 200));
}
else $_POST['description'] = '';
//-Topic description MOD- End
]]></add>
</operation>
If I'm interpreting this correctly, I need to add the text AFTER THE brace, producing:
if (empty($post_errors))
{
//-Topic description MOD- Start
if (isset($_POST['description']))
{
$_POST['description'] = strtr($func['htmlspecialchars']($_POST['description']), array("\r" => '', "\n" => '', "\t" => ''));
// Maximum number of characters.
if ($func['strlen']($_POST['description']) > 200)
$_POST['description'] = addslashes($func['substr'](stripslashes($_POST['description']), 0, 200));
}
else
$_POST['description'] = '';
//-Topic description MOD- End
$msgOptions = array(
'id' => $row['ID_MSG'],
'subject' => isset($_POST['subject']) ? $_POST['subject'] : null,
'body' => isset($_POST['message']) ? $_POST['message'] : null,
'icon' => isset($_POST['icon']) ? preg_replace('~[\./\\\\*\':"<>]~', '', $_POST['icon']) : null,
);
I omitted some lines. Now, with the limited knowledge of PHP that I have, I'm noticing that after the 'else' statement, there is only one line of code, no braces. Therefore, lines under $_POST['description'] = ''; would not be included into the if statement.
So how can I correctly implement this segment of coding?
Sorry double post. just realized I could modify my post, didn't need to add another one like I did earlier.
Sorry that was a double post just now. Can someone delete one to avoid confusion? It won't let me remove my own post.
You are doing it backwards.
<operation><search position="after"><![CDATA[
if (empty($post_errors))
]]></search>
Means that you have to add the text before that code. The position is the position of the search text relative to the added text.
ouch ok...I've been doing it backwards all along. Funny thing is, is that I haven't had any problems yet.
After installation, I click on any forum and receive the following message:
Unknown column 'mf.description' in 'field list'
File: /hsphere/local/home/threei/3iclan.net/thesite/Sources/MessageIndex.php
Line: 457
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.3, while your database is at version 1.1.2. The above error might possibly go away if you execute the latest version of upgrade.php.
After doing some thinking, I suspect that it's because my host somehow isn't really allowing me to execute any files correctly even though I've done ALL of the correct CHMODS prior to installation. In particular, I noticed that this mod has the file DB.php included into it, which didn't execute properly. I tried two things, going to the url www.mysite.net/mysitefolder/Packages/temp/DB.php where it was correctly extracted by default, and then I also tried placing the file in SMF's root, thus going to www.mysite.net/mysitefolder/DB.php, no luck. In either case, I received the message:
Error: Cannot install - please verify you put this in the same place as SMF's index.php
Anyway, I need to somehow manually update my database. I have direct DB access using phpMyAdmin. Can you tell me the proper queries and syntax to use in the SQL button? I realize that the code in DB.php is written in PHP. Another problem I had, is that I couldn't properly interpret the MySQL code and determine which table(s) is/are being modified. Here's the contents of DB.php:
<?php
if (!defined('SMF'))
die('<b>Error:</b> Cannot install - please verify you put this in the same place as SMF\'s index.php.');
//DB.php Version 1.0
//create the column if not exists
$result = db_query("SHOW COLUMNS FROM {$db_prefix}messages LIKE 'description'",__FILE__,__LINE__);
if (!mysql_num_rows($result))
{
$result = db_query("ALTER IGNORE TABLE {$db_prefix}messages ADD column description TINYTEXT NOT NULL AFTER subject",__FILE__,__LINE__);
}
?>
Thanks!
Add require('SSI.php') after <?php and run the file from the forum's root.
If still doesn't work then run this query using phpmyadmin
ALTER IGNORE TABLE {$db_prefix}messages ADD column description MEDIUMTEXT NOT NULL AFTER subject
Replace {$db_prefix} with your database prefix.
ok that fixed it. I'm now receiving an error in the file Display.template.php. Can you help me solve this one? The error is:
Template Parse Error
233: <tr class="titlebg" id="description_row" style="font-weight: normal; ',(empty($context['description']) ? 'display: none' : '') , '">
The file Display.template.php has been attached.
I have a few other mods installed, nothing crazy like some people have (I've read that one person had 78 mods installed), only about 20 or so. Here's a list (all of them installed manually):
1. Treasury 1.23
2. TinyPortal 0.983
3. SMF 1.0.11 / 1.1.3 Update 1.1
4. Profile Comments 1.2.1
5. User Control Panel By Alan S 1.2
6. No Temp Directory Removal 1.0
7. Admin Notepad 1.0
8. Member Notepad 1.0
9. Active Members In Topic 1.5
10. New Topic Button 1.0
11. Custom Profile Field Mod 3.16
12. Country Flags 1.0.1
13. Youtube Field by Alan S 1.0
14. YouTube BBC Tag (XHTML Compliant) 1.2
15. Contact Page 1.1
16. Allowed Groups Embedded Flash 1.2.0
17. Bookmarks 1.0
18. Enhanced Forum Statistics 1.0
19. Export Personal Messages 1.0
20. SMF File Manager 2.0
21. Google Talk Field 1.0.2
22. Group Moderators 1.4
Every mod I've got installed works perfectly and there are no other forum errors.
I also realize that programming can be misleading and that the error COULD be somewhere else. Let me know if I need to post any other files and I will. Thanks.
You added in the wrong place a block of code.
The search was
<search position="after"><![CDATA[';
if (!empty($settings['display_who_viewing']))]]></search>
so you need to add before the ';
echo'<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="border-bottom: 0;">';
if (!empty($settings['display_who_viewing']))
becomes
echo'<table width="100%" cellpadding="3" cellspacing="0" border="0" class="tborder" style="border-bottom: 0;">
<!-- //-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 -->';
if (!empty($settings['display_who_viewing']))
Thank you so much! You are awesome! Thanks for putting up with me and my n00bness and being such a great help and teacher. :)
You're welcome.
Please remove the attachment from your previous post as it is not needed anymore.
I don't mind it leaving there, but it takes up server resources without any usefulness.
Mod for fine but i got always such kinds of errors:
8: Undefined index: description
File: /home2/craxxxxxxxs/www/Sources/Subs-Post.php
Linea: 1518
some solution ?
Whenever I use my quick reply, I get the following errors:
8: Undefined index: description
File: ...../forum/Sources/Post.php
Line: 1380
8: Undefined index: description
File: ...../forum/Sources/Post.php
Line: 1382
Here is the coding for lines 1377 to 1387.
//-Topic description MOD- Start
if ($func['strlen']($_POST['description']) > 200)
$_POST['description'] = addslashes($func['substr'](stripslashes($_POST['description']), 0, 200));
$_POST['description'] = strtr($func['htmlspecialchars']($_POST['description']), array("\r" => '', "\n" => '', "\t" => ''));
//-Topic description MOD- End
// At this point, we want to make sure the subject isn't too long.
if ($func['strlen']($_POST['subject']) > 100)
$_POST['subject'] = addslashes($func['substr'](stripslashes($_POST['subject']), 0, 100));
The other Mods I have installed are:
1. SMF Trader System 1.1
2. View Single Post 1.1
3. Global Headers Footers 1.3
4. Member Color Link 2.0.0
5. Signature BBCode Bar 1.4
6. View Topic Permissions 1.1.0a
7. SMF Ranks 1.1
8. User Control Panel By Alan S 1.2
9. Profil Moderator Managment
10. Topic description 1.1
11. Group Moderators 1.4
12. User Post Limit Options 1.0
13. Default Membergroup on Registration 1.1
14. Users Active in Last 24 Hours 1.0
15. Enhanced Quick Reply
This should happen when you are using a different theme and you haven't applied the changes to it. To fix this
open Post.php and replace this bit
//-Topic description MOD- Start
if ($func['strlen']($_POST['description']) > 200)
$_POST['description'] = addslashes($func['substr'](stripslashes($_POST['description']), 0, 200));
$_POST['description'] = strtr($func['htmlspecialchars']($_POST['description']), array("\r" => '', "\n" => '', "\t" => ''));
//-Topic description MOD- End
with
//-Topic description MOD- Start
if (!isset($_POST['description']))
$_POST['description'] = '';
else
{
if ($func['strlen']($_POST['description']) > 200)
$_POST['description'] = addslashes($func['substr'](stripslashes($_POST['description']), 0, 200));
$_POST['description'] = strtr($func['htmlspecialchars']($_POST['description']), array("\r" => '', "\n" => '', "\t" => ''));
}
//-Topic description MOD- End
I think I will include this in the main package, to avoid having errors because of the template.
Okay. That fixed the error completely. I've found another error. When I press the preview button located under the quick reply, I get the following errors:
8: Undefined index: description
File: /hsphere/local/home/manareal/duelplanet.com/forum/Sources/Post.php
Line: 377
8: Undefined index: description
File: /hsphere/local/home/manareal/duelplanet.com/forum/Sources/Post.php
Line: 444
Here are lines 370 to 380 in Post.php:
if ($func['htmltrim']($_REQUEST['subject']) == '')
$context['post_error']['no_subject'] = true;
if ($func['htmltrim']($_REQUEST['message']) == '')
$context['post_error']['no_message'] = true;
if (!empty($modSettings['max_messageLength']) && $func['strlen']($_REQUEST['message']) > $modSettings['max_messageLength'])
$context['post_error']['long_message'] = true;
$func['htmltrim']($_REQUEST['description']); //-Topic description MOD-
// Are you... a guest?
if ($user_info['is_guest'])
Here are lines 440 to 450:
$context['post_error']['no_subject'] = true;
//-Topic description MOD- Start
$form_description = strtr($func['htmlspecialchars'](stripslashes($_REQUEST['description'])), array("\r" => '', "\n" => '', "\t" => ''));
if ($func['strlen']($form_description) > 200)
$form_description = $func['substr']($form_description, 0, 200);
//-Topic description MOD- End
// Any errors occurred?
if (!empty($context['post_error']))
{
I attached my Post.php file if you want to take a closer look.
Please help me. :(
PLEASE help me with this ASAP. It's really halting the development of my site. I want to get this resolved before I continue.
Hi
error:
http://www..../forum/index.php?action=post2
Lİne: 1421 & 1419
1421 :
$_POST['description'] = strtr($func['htmlspecialchars']($_POST['description']), array("\r" => '', "\n" => '', "\t" => ''));
1419 :
if ($func['strlen']($_POST['description']) > 200)
1418 - 1422
//-Topic description MOD- Start
if ($func['strlen']($_POST['description']) > 200)
$_POST['description'] = addslashes($func['substr'](stripslashes($_POST['description']), 0, 200));
$_POST['description'] = strtr($func['htmlspecialchars']($_POST['description']), array("\r" => '', "\n" => '', "\t" => ''));
//-Topic description MOD- End
Rudolph,
Sorry for the PM, I am an idiot. I missed this thread somehow & the link didn't work for me. User error, I'm sure. ::)
I'll post my question here.
Is there any way I can make the text smaller for the description that shows when you view a board. See arrow #2 in the pic below.
Also, the subject/description box seems to be double spaced (between "Top" and "Secret"). How can I fix this and make it single spaced? See arrow #1 in the pic below.
In this pic, "Top" is the subject & "Secret" is the description.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg465.imageshack.us%2Fimg465%2F9765%2F11ay5.png&hash=cdabca7a95358ddf987064f27239a84ae71f8eda)
Thanks for your mod & your time!
Quote from: Lew Cipher on August 09, 2007, 06:09:13 PM
Rudolph,
Sorry for the PM, I am an idiot. I missed this thread somehow & the link didn't work for me. User error, I'm sure. ::)
I'll post my question here.
Is there any way I can make the text smaller for the description that shows when you view a board. See arrow #2 in the pic below.
Also, the subject/description box seems to be double spaced (between "Top" and "Secret"). How can I fix this and make it single spaced? See arrow #1 in the pic below.
In this pic, "Top" is the subject & "Secret" is the description.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg465.imageshack.us%2Fimg465%2F9765%2F11ay5.png&hash=cdabca7a95358ddf987064f27239a84ae71f8eda)
Thanks for your mod & your time!
Alternately, a way to turn it on & off per board would be great.
Ok I hope my post is a bit more worth than the rest, no offense made I hope ;)
But I found a little so called bug, in the mod.
Here you go:
http://www.inflameproject.com/forum/index.php?action=quotefast;quote=28;sesc;modify;xml
8: Undefined index: description
File: /home/inflame/domains/inflameproject.com/public_html/forum/Themes/default/languages/Post.english.php (eval?)
Line: 21
What did I do?
I tried to quick edit the message, but it seems to fail, although the rest of the forum does pretty nice,
here is the topic talking about: http://www.inflameproject.com/forum/index.php?topic=15.0
The only thing I can come up with is the topic is full with tags for size, although that should not matter,
so there is really no reason that this modify fails.
I know you are away till September, so I will put this on a hold, its the only topic that goes weird, so no probs for me yet :)
EDIT:
I maybe think I know why: The topic is currently locked ;)
Hi I get this error.
Can anyone help ?
7. Execute Modification ./Themes/default/Display.template.php Test failed
it probably conflicts with another mod you have installed.
If you want to use the mod, you may need to manually install it on the default theme.
You may find the support docs on Manual Installation Of Mods (http://docs.simplemachines.org/index.php?topic=402.msg531#msg531) useful.
Quote from: Lew Cipher on August 09, 2007, 06:09:13 PM
Rudolph,
Is there any way I can make the text smaller for the description that shows when you view a board. See arrow #2 in the pic below.
Also, the subject/description box seems to be double spaced (between "Top" and "Secret"). How can I fix this and make it single spaced? See arrow #1 in the pic below.
In this pic, "Top" is the subject & "Secret" is the description.
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg465.imageshack.us%2Fimg465%2F9765%2F11ay5.png&hash=cdabca7a95358ddf987064f27239a84ae71f8eda)
Thanks for your mod & your time!
Quote from: Lew Cipher on August 10, 2007, 08:06:14 PM
Alternately, a way to turn it on & off per board would be great.
Bump for Rudolph
Please, Rudolph. I could use some help here. :-\
At least a way to turn it on & off per board. :)
To make the text smaller of the description add in your style.css the following
.topic_description
{
font-size: smaller;
}
or
.topic_description
{
font-size: 70%;
}
Specifying the percentage relative to the title's size.
For the second try this:
In MessageIndex.template.php
<br /><span id="msg_descr_' , $topic['first_post']['id'] , '" class="topic_description">',$topic['description'],'</span>',' <!-- //-Topic Description MOD- -->
, in_array($context['current_board'],array(1,2,3,4)) ? '
<br /><span id="msg_descr_' , $topic['first_post']['id'] , '" class="topic_description">',$topic['description'],'</span>' : '' ,' <!-- //-Topic Description MOD- -->
Hopefully it works, as I don't hate the opportunity to test it.
Replace 1,2,3,4 with the id's of the boards where you want this to be active.
If you want to exclude boards, maybe because you have less boards you want without descriptions, use this
, !in_array($context['current_board'],array(1,2,3,4)) ? '
<br /><span id="msg_descr_' , $topic['first_post']['id'] , '" class="topic_description">',$topic['description'],'</span>' : '' ,' <!-- //-Topic Description MOD- -->
Here the id's are for the boards that you don't want to have descriptions.
Quote from: Rudolf on September 24, 2007, 11:46:02 AM
For the second try this:
In MessageIndex.template.php
<br /><span id="msg_descr_' , $topic['first_post']['id'] , '" class="topic_description">',$topic['description'],'</span>',' <!-- //-Topic Description MOD- -->
, in_array($context['current_board'],array(1,2,3,4)) ? '
<br /><span id="msg_descr_' , $topic['first_post']['id'] , '" class="topic_description">',$topic['description'],'</span>' : '' ,' <!-- //-Topic Description MOD- -->
Hopefully it works, as I don't hate the opportunity to test it.
Replace 1,2,3,4 with the id's of the boards where you want this to be active.
When I do this I get the following error message:
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/xxxxxxxl/public_html/forum/Themes/default/MessageIndex.template.php on line 309
Line 309 is the 1st replaced line.
Ideas or suggestions?
TIA!
Here are lines 302 through 327 for reference:
// Is this topic new? (assuming they are logged in!)
if ($topic['new'] && $context['user']['is_logged'])
echo '
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['images_url'], '/', $context['user']['language'], '/new.gif" alt="', $txt[302], '" /></a>';
echo '<br />
<small id="pages' . $topic['first_post']['id'] . '">', $topic['pages'], '</small>
, in_array($context['current_board'],array(13)) ? '
<br /><span id="msg_descr_' , $topic['first_post']['id'] , '" class="topic_description">',$topic['description'],'</span>' : '' ,' <!-- //-Topic Description MOD- -->
</td>
<td class="windowbg2" valign="middle" width="14%">
', $topic['first_post']['member']['link'], '
</td>
<td class="windowbg' , $topic['is_sticky'] ? '3' : '' , '" valign="middle" width="4%" align="center">
', $topic['replies'], '
</td>
<td class="windowbg' , $topic['is_sticky'] ? '3' : '' , '" valign="middle" width="4%" align="center">
', $topic['views'], '
</td>
<td class="windowbg2" valign="middle" width="22%">
<a href="', $topic['last_post']['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt[111], '" title="', $txt[111], '" style="float: right;" /></a>
<span class="smalltext">
', $topic['last_post']['time'], '<br />
', $txt[525], ' ', $topic['last_post']['member']['link'], '
</span>
</td>';
Try replacing with this: (first undo the previous replace)
', in_array($context['current_board'],array(1,2,3,4)) ? '
<br /><span id="msg_descr_' . $topic['first_post']['id'] . '" class="topic_description">'.$topic['description'].'</span>' : '' ,' <!-- //-Topic Description MOD- -->
Quote from: Rudolf on September 24, 2007, 05:26:14 PM
Try replacing with this: (first undo the previous replace)
', in_array($context['current_board'],array(1,2,3,4)) ? '
<br /><span id="msg_descr_' . $topic['first_post']['id'] . '" class="topic_description">'.$topic['description'].'</span>' : '' ,' <!-- //-Topic Description MOD- -->
YOU ROCK!!! IT WORKED!!!except...The text input box is still there on the posting form. Any way to remove that per board also? I'm an idiot when it comes to php but I think it would be done in post.template.php, wouldn't it?
BTW, thank you for your time with this. :)
Yes in Post.template.php find
', (!empty($context['is_first_post']) ?
Replace with
', (!empty($context['is_first_post'] && in_array($context['current_board'], array(1,2,3,4))) ?
or
', (!empty($context['is_first_post'] && !in_array($context['current_board'], array(1,2,3,4))) ?
Use the first to show on the specified boards or second to don't show on the specified boards.
Quote from: Rudolf on September 24, 2007, 07:49:50 PM
Yes in Post.template.php find
', (!empty($context['is_first_post']) ?
Replace with
', (!empty($context['is_first_post'] && in_array($context['current_board'], array(1,2,3,4))) ?
Use the first to show on the specified boards
I was close when i was trying to figure it out earlier. :)
OK...
I just did what you suggested & now I get this error:
Parse error: syntax error, unexpected T_BOOLEAN_AND, expecting ')' in /home/xxxxxx/public_html/forum/Themes/default/Post.template.php on line 438
Here are lines 437 - 447:
<!-- //-Topic description MOD- Start -->
', (!empty($context['is_first_post'] && in_array($context['current_board'], array(13))) ?
'<tr>
<td align="right" style="font-weight: bold;" id="caption_description">
'. $txt['topic_description']. ':
</td>
<td>
<input type="text" name="description" value="'. $context['description'] .'" tabindex="'. $context['tabindex']++. '" size="80" maxlength="80" />
</td>
</tr>':'<input type="hidden" name="description" value="" readonly />') ,'
<!-- //-Topic description MOD- End -->
Sorry for this, I don't have a forum in front of me to try it out, so I'm just writing the code and can't test it. Some punctuation just doesn't comes right no matter how much I doublecheck the code when I write.
This should work
', (!empty($context['is_first_post']) && in_array($context['current_board'], array(1,2,3,4))) ?
Quote from: Rudolf on September 25, 2007, 03:15:22 AM
Sorry for this, I don't have a forum in front of me to try it out, so I'm just writing the code and can't test it. Some punctuation just doesn't comes right no matter how much I doublecheck the code when I write.
This should work
', (!empty($context['is_first_post']) && in_array($context['current_board'], array(1,2,3,4))) ?
I truly appreciate your help on this very much.
When I apply this code, I get this error:
Parse error: syntax error, unexpected ')', expecting ',' or ';' in /home/thegool/public_html/forum/Themes/default/Post.template.php on line 446
BTW, after backing up a copy of the files, I do try to figure this out on my own. I'm trying to learn, I just am fumbling my way through this.
Thanks again.
As reference, here are lines 426 - 454:
// Now show the subject box for this post.
echo '
<tr>
<td align="right" style="font-weight: bold;', isset($context['post_error']['no_subject']) ? 'color: red;' : '', '" id="caption_subject">
', $txt[70], ':
</td>
<td>
<input type="text" name="subject"', $context['subject'] == '' ? '' : ' value="' . $context['subject'] . '"', ' tabindex="', $context['tabindex']++, '" size="80" maxlength="80" />
</td>
</tr>
<!-- //-Topic description MOD- Start -->
', (!empty($context['is_first_post']) && in_array($context['current_board'], array(13))) ?
'<tr>
<td align="right" style="font-weight: bold;" id="caption_description">
'. $txt['topic_description']. ':
</td>
<td>
<input type="text" name="description" value="'. $context['description'] .'" tabindex="'. $context['tabindex']++. '" size="80" maxlength="80" />
</td>
</tr>':'<input type="hidden" name="description" value="" readonly />') ,'
<!-- //-Topic description MOD- End -->
<tr>
<td align="right">
<b>', $txt[71], ':</b>
</td>
<td>
<select name="icon" id="icon" onchange="showimage()">';
This will work. (I tested it)
', (!empty($context['is_first_post']) && !in_array($context['current_board'], array(1,2)) ?
or
', (!empty($context['is_first_post']) && in_array($context['current_board'], array(1,2)) ?
Quote from: Rudolf on September 25, 2007, 02:21:18 PM
This will work. (I tested it)
', (!empty($context['is_first_post']) && !in_array($context['current_board'], array(1,2)) ?
or
', (!empty($context['is_first_post']) && in_array($context['current_board'], array(1,2)) ?
Yes sir, it worked!!!
Thank you for your patience and your expertise! I hope these instructions help someone else in the future. :)
HI!
can i put Topic Description in "Recent Unread Topics" at recent.template.php ?
what i need to do this?
sorry for my poor English, i'm Portuguese ;)
I think this mod just ruined my forum rply format.. Somebody help me?
http://www.simplemachines.org/community/index.php?topic=209062.0
Screenshot below.
This doesn't seems like the default theme. Does the default the work?
Any errors in the log?
I went through and made all the custom edits to post.php and it solved the errors mentioned in the thread resulting from using quick reply. But, as mentioned above, I now get the following errors when previewing from the quick reply. I don't see a solution for this problem in the thread.
8: Undefined index: description
File: /home/xxxxxx/public_html/smf/Sources/Post.php
Line: 444
8: Undefined index: description
File: /home/xxxxxx/public_html/smf/Sources/Post.php
Line: 377
Line 365-377:
// Previewing, modifying, or posting?
if (isset($_REQUEST['message']) || !empty($context['post_error']))
{
// Validate inputs.
if (empty($context['post_error']))
{
if ($func['htmltrim']($_REQUEST['subject']) == '')
$context['post_error']['no_subject'] = true;
if ($func['htmltrim']($_REQUEST['message']) == '')
$context['post_error']['no_message'] = true;
if (!empty($modSettings['max_messageLength']) && $func['strlen']($_REQUEST['message']) > $modSettings['max_messageLength'])
$context['post_error']['long_message'] = true;
$func['htmltrim']($_REQUEST['description']); //-Topic description MOD-
Line 443-447:
//-Topic description MOD- Start
$form_description = strtr($func['htmlspecialchars'](stripslashes($_REQUEST['description'])), array("\r" => '', "\n" => '', "\t" => ''));
if ($func['strlen']($form_description) > 200)
$form_description = $func['substr']($form_description, 0, 200);
//-Topic description MOD- End
Thanks very much. Great mod!
Bump
Greetings, will this show HTML tags?
After installing this mod (SMF 1.1.4) I got problems with the SplitTopics.template.php...
The problem is here in this function:
function select(direction, msg_id)
{
if (window.XMLHttpRequest)
{
getXMLDocument("', $scripturl, '?action=splittopics;sa=selectTopics;subname=', $context['topic']['subject'], ';topic=', $context['topic']['id'], '." + start[0] + ";start2=" + start[1] + ";move=" + direction + ";msg=" + msg_id + ";xml", onDocReceived);
return false;
}
else
return true;
}
The getXMLDocument doesn't work any more...
Any suggestions?
What's the error message?
I don't see how this could be caused by the mod, because it doesn't changes the SplitTopics.template, nor the getXMLDocument javascript function.
The Error is an Javascript-Error, not shown in the Errorlog from SMF. But it isn't possible to split topics. A little bit hard to describe. You click on the messages in the "split-mask" and nothing changes...
I know that your mod doesn't change anything in the function nor in the splittopics.template.php, maybe thats why it doesn't work anymore? Cause in the next function a few changes happens with your mod it's the "function onDocReceived(XMLDoc)"...
What is the javascript error?
I will take a look at the split topics on my test board.
Code = 0
Expecting ')'
Unfortunately I've many mods in my board so the line doesn't help anything...
Please try it on your test-board :(
Ciao Rudolf
why so many times i have errors as this:
http://www.crazyzone.ws/index.php?action=movetopic2;topic=93359.0
8: Undefined index: description
File: /home2/crazyzonews/www/Sources/Subs-Post.php
Linea: 1560
Subs-Post.php
// Insert the post. -Topic description MOD- query modified
db_query("
INSERT INTO {$db_prefix}messages
(ID_BOARD, ID_TOPIC, ID_MEMBER, subject, description, body, posterName, posterEmail, posterTime,
posterIP, smileysEnabled, modifiedName, icon)
VALUES ($topicOptions[board], $topicOptions[id], $posterOptions[id], SUBSTRING('$msgOptions[subject]', 1, 255), SUBSTRING('$msgOptions[description]', 1, 255), SUBSTRING('$msgOptions[body]', 1, 65534), SUBSTRING('$posterOptions[name]', 1, 255), SUBSTRING('$posterOptions[email]', 1, 255), " . time() . ",
SUBSTRING('$posterOptions[ip]', 1, 255), " . ($msgOptions['smileys_enabled'] ? '1' : '0') . ", '', SUBSTRING('$msgOptions[icon]', 1, 16))", __FILE__, __LINE__);
$msgOptions['id'] = db_insert_id();
Line 1560: VALUES ($topicOptions[board], $topicOptions[id], $posterOptions[id], SUBSTRING('$msgOptions[subject]', 1, 255), SUBSTRING('$msgOptions[description]', 1, 255), SUBSTRING('$msgOptions[body]', 1, 65534), SUBSTRING('$posterOptions[name]', 1, 255), SUBSTRING('$posterOptions[email]', 1, 255), " . time() . ",
some solution?
Quote from: edi67 on January 15, 2008, 04:43:00 AM
Ciao Rudolf
why so many times i have errors as this:
http://www.crazyzone.ws/index.php?action=movetopic2;topic=93359.0
8: Undefined index: description
File: /home2/crazyzonews/www/Sources/Subs-Post.php
Linea: 1560
Subs-Post.php
// Insert the post. -Topic description MOD- query modified
db_query("
INSERT INTO {$db_prefix}messages
(ID_BOARD, ID_TOPIC, ID_MEMBER, subject, description, body, posterName, posterEmail, posterTime,
posterIP, smileysEnabled, modifiedName, icon)
VALUES ($topicOptions[board], $topicOptions[id], $posterOptions[id], SUBSTRING('$msgOptions[subject]', 1, 255), SUBSTRING('$msgOptions[description]', 1, 255), SUBSTRING('$msgOptions[body]', 1, 65534), SUBSTRING('$posterOptions[name]', 1, 255), SUBSTRING('$posterOptions[email]', 1, 255), " . time() . ",
SUBSTRING('$posterOptions[ip]', 1, 255), " . ($msgOptions['smileys_enabled'] ? '1' : '0') . ", '', SUBSTRING('$msgOptions[icon]', 1, 16))", __FILE__, __LINE__);
$msgOptions['id'] = db_insert_id();
Line 1560: VALUES ($topicOptions[board], $topicOptions[id], $posterOptions[id], SUBSTRING('$msgOptions[subject]', 1, 255), SUBSTRING('$msgOptions[description]', 1, 255), SUBSTRING('$msgOptions[body]', 1, 65534), SUBSTRING('$posterOptions[name]', 1, 255), SUBSTRING('$posterOptions[email]', 1, 255), " . time() . ",
some solution?
up :(
Quote from: Silent on January 14, 2008, 10:24:23 AM
Code = 0
Expecting ')'
Unfortunately I've many mods in my board so the line doesn't help anything...
Please try it on your test-board :(
up :(
About the undefined description message, I updated the mod so reinstalling it would solve the problem.
If you don't want to reinstall then just perform this small change in the Post.php file:
//-Topic description MOD- Start
if ($func['strlen']($_POST['description']) > 200)
$_POST['description'] = addslashes($func['substr'](stripslashes($_POST['description']), 0, 200));
$_POST['description'] = strtr($func['htmlspecialchars']($_POST['description']), array("\r" => '', "\n" => '', "\t" => ''));
//-Topic description MOD- End
//-Topic description MOD- Start
if (!isset($_POST['description']))
$_POST['description'] = '';
if ($func['strlen']($_POST['description']) > 200)
$_POST['description'] = addslashes($func['substr'](stripslashes($_POST['description']), 0, 200));
$_POST['description'] = strtr($func['htmlspecialchars']($_POST['description']), array("\r" => '', "\n" => '', "\t" => ''));
//-Topic description MOD- End
Quote from: Silent on January 14, 2008, 10:24:23 AM
Code = 0
Expecting ')'
Unfortunately I've many mods in my board so the line doesn't help anything...
Please try it on your test-board :(
I can not reproduce the error, splitting topics works as it should.
I install also the discription. I've the classic theme, use smf 1.1.4
So after the installation, i've to change somethings by myself. That works fine. But there is a little error, and it don't gives errors in the log.
So i made a picture of the error. I think there is standing something wrong in the display.temlate.php
But i don't see it.
Hopely someone can help me :D
A link to your forum would help?
Or attach your Display.template.php file
The forum is in mainantance, so you can not see anything then.
I give you the display.template.php :)
Find the part:
<!-- //-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 -->';
and replace with
echo '
<!-- //-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 -->';
I change it, but it doesn't matter.
I saw you write the: echo'
Whats going wrong :o
Sorry, at a second look I asked for the wrong file. The MessageIndex.template.php is the file where this is used. Attach that one.
It could happen ;)
I attach the messageIndex.template.php
Find and delete
class="topic_description">',$topic['description'],'</span>',' <!-- //-Topic Description MOD- -->
Find
<td class="windowbg" valign="middle" width="42%">
', $topic['first_post']['link'], ' ', $topic['new'] && $context['user']['is_logged'] ? '<a href="' . $scripturl . '?topic=' . $topic['id'] . '.msg' . $topic['new_from'] . '#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>' : '', ' <span class="smalltext">', $topic['pages'], '</span></td>
Replace with
<td class="windowbg" valign="middle" width="42%">
', $topic['first_post']['link'], ' ', $topic['new'] && $context['user']['is_logged'] ? '<a href="' . $scripturl . '?topic=' . $topic['id'] . '.msg' . $topic['new_from'] . '#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>' : '', ' <span class="smalltext">', $topic['pages'], '</span>
<br /><span id="msg_descr_' , $topic['first_post']['id'] , '" class="topic_description">',$topic['description'],'</span>',' <!-- //-Topic Description MOD- --></td>
Has the error when previewing from quick reply been fixed in this version?
Thanks very much
Yes, it should be fixed.
The version number is the same, but the package has been fixed.
Quote from: Rudolf on January 21, 2008, 04:46:41 PM
About the undefined description message, I updated the mod so reinstalling it would solve the problem.
If you don't want to reinstall then just perform this small change in the Post.php file:
//-Topic description MOD- Start
if ($func['strlen']($_POST['description']) > 200)
$_POST['description'] = addslashes($func['substr'](stripslashes($_POST['description']), 0, 200));
$_POST['description'] = strtr($func['htmlspecialchars']($_POST['description']), array("\r" => '', "\n" => '', "\t" => ''));
//-Topic description MOD- End
//-Topic description MOD- Start
if (!isset($_POST['description']))
$_POST['description'] = '';
if ($func['strlen']($_POST['description']) > 200)
$_POST['description'] = addslashes($func['substr'](stripslashes($_POST['description']), 0, 200));
$_POST['description'] = strtr($func['htmlspecialchars']($_POST['description']), array("\r" => '', "\n" => '', "\t" => ''));
//-Topic description MOD- End
i done your modification but not changed this is last error same as other:
http://www.crazyzone.ws/index.php?action=movetopic2;topic=94492.0
8: Undefined index: description
File: /home2/crazyzonews/www/Sources/Subs-Post.php
Linea: 1560
help me
Quote from: Rudolf on January 23, 2008, 06:03:17 PM
Find and delete
class="topic_description">',$topic['description'],'</span>',' <!-- //-Topic Description MOD- -->
Find
<td class="windowbg" valign="middle" width="42%">
', $topic['first_post']['link'], ' ', $topic['new'] && $context['user']['is_logged'] ? '<a href="' . $scripturl . '?topic=' . $topic['id'] . '.msg' . $topic['new_from'] . '#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>' : '', ' <span class="smalltext">', $topic['pages'], '</span></td>
Replace with
<td class="windowbg" valign="middle" width="42%">
', $topic['first_post']['link'], ' ', $topic['new'] && $context['user']['is_logged'] ? '<a href="' . $scripturl . '?topic=' . $topic['id'] . '.msg' . $topic['new_from'] . '#new"><img src="' . $settings['images_url'] . '/' . $context['user']['language'] . '/new.gif" alt="' . $txt[302] . '" border="0" /></a>' : '', ' <span class="smalltext">', $topic['pages'], '</span>
<br /><span id="msg_descr_' , $topic['first_post']['id'] , '" class="topic_description">',$topic['description'],'</span>',' <!-- //-Topic Description MOD- --></td>
This part works now, that code above my text is gone finally. and get in the board my description. But now i get the next problem, i haven't earlier ::)
I make a picture of it. I made the names black for privacy.
Normally all that buttons is in a row above the text topic. And the discription named "deeltje 1" is under the title named: "test"
See the picture for example.
I made the change in post.php and still get an error generated in the logs when you preview from quick reply:
8: Undefined index: description
File: /home/xxxxxx/public_html/smf/Sources/Post.php
Line: 377
Lines 368-379 of Post.php:
// Validate inputs.
if (empty($context['post_error']))
{
if ($func['htmltrim']($_REQUEST['subject']) == '')
$context['post_error']['no_subject'] = true;
if ($func['htmltrim']($_REQUEST['message']) == '')
$context['post_error']['no_message'] = true;
if (!empty($modSettings['max_messageLength']) && $func['strlen']($_REQUEST['message']) > $modSettings['max_messageLength'])
$context['post_error']['long_message'] = true;
$func['htmltrim']($_REQUEST['description']); //-Topic description MOD-
// Are you... a guest?
Thanks
I would like for HTML tags to work in the description field only for Admin, do you have the added code for that? Thanks much!
hi,
I have one question, is it possible to limit to X characters only the description showed on board index and not the one showed on reading topic? maybe adding some "..." on index after the cutted description?
thx for this wonderful mod
Any way to get this to work for 2.0 Beta 3?
I tried to run the parser on here, most of it works, but a few things error
I sent this topic (http://www.simplemachines.org/community/index.php?topic=234222.msg1508179#msg1508179) for this modification. Can you help me ?
Thank You
Quote from: [Support] on April 14, 2008, 02:43:21 PM
I sent this topic (http://www.simplemachines.org/community/index.php?topic=234222.msg1508179#msg1508179) for this modification. Can you help me ?
Thank You
Help ?
I hope this gets updated for 2.0 B3.1P soon! This really is easily one of the most useful mods I used on 1.1.X.
I agree with Toker, I hope this gets updated for SMF B3.1
I hope so as well. I would hate to loose all my topic descriptions as well as the ability to have them on future threads.
I get this when installing to a 1.1.5 forum;
Type Action Description
1. Execute Code DB.php
2. Execute Modification ./Sources/Display.php Test successful
3. Execute Modification ./Sources/MessageIndex.php Test successful
4. Execute Modification ./Sources/Post.php Test successful
5. Execute Modification ./Sources/Subs-Post.php Test successful
6. Execute Modification ./Themes/default/index.template.php Test successful
7. Execute Modification ./Themes/default/Display.template.php Test failed
8. Execute Modification ./Themes/default/MessageIndex.template.php Test successful
9. Execute Modification ./Themes/default/Post.template.php Test successful
10. Execute Modification ./Themes/default/Xml.template.php Test failed
11. Execute Modification ./Themes/default/xml_board.js Test successful
12. Execute Modification ./Themes/default/xml_topic.js Test successful
13. Execute Modification ./Themes/default/languages/index.english.php Test successful
Any ideas?
Is there any way to force inputting a description?
A suggestion - this should be altered so that the description appears on the "show unread topics/replies since your last visit" pages. :)
Quote from: OblivionMage on May 21, 2008, 01:50:03 PM
I get this when installing to a 1.1.5 forum;
Type Action Description
1. Execute Code DB.php
2. Execute Modification ./Sources/Display.php Test successful
3. Execute Modification ./Sources/MessageIndex.php Test successful
4. Execute Modification ./Sources/Post.php Test successful
5. Execute Modification ./Sources/Subs-Post.php Test successful
6. Execute Modification ./Themes/default/index.template.php Test successful
7. Execute Modification ./Themes/default/Display.template.php Test failed
8. Execute Modification ./Themes/default/MessageIndex.template.php Test successful
9. Execute Modification ./Themes/default/Post.template.php Test successful
10. Execute Modification ./Themes/default/Xml.template.php Test failed
11. Execute Modification ./Themes/default/xml_board.js Test successful
12. Execute Modification ./Themes/default/xml_topic.js Test successful
13. Execute Modification ./Themes/default/languages/index.english.php Test successful
Any ideas?
I get the same above errors when trying to install it on 1.1.5.
Any ideas?
Quote from: Kimmie on June 14, 2008, 11:36:00 PM
Quote from: OblivionMage on May 21, 2008, 01:50:03 PM
I get this when installing to a 1.1.5 forum;
Type Action Description
1. Execute Code DB.php
2. Execute Modification ./Sources/Display.php Test successful
3. Execute Modification ./Sources/MessageIndex.php Test successful
4. Execute Modification ./Sources/Post.php Test successful
5. Execute Modification ./Sources/Subs-Post.php Test successful
6. Execute Modification ./Themes/default/index.template.php Test successful
7. Execute Modification ./Themes/default/Display.template.php Test failed
8. Execute Modification ./Themes/default/MessageIndex.template.php Test successful
9. Execute Modification ./Themes/default/Post.template.php Test successful
10. Execute Modification ./Themes/default/Xml.template.php Test failed
11. Execute Modification ./Themes/default/xml_board.js Test successful
12. Execute Modification ./Themes/default/xml_topic.js Test successful
13. Execute Modification ./Themes/default/languages/index.english.php Test successful
Any ideas?
I get the same above errors when trying to install it on 1.1.5.
Any ideas?
Yahh me tooo!!! The same problems.
but it works, I don't know if it do bugs in some parts of the forum.
pleaseee someonte?!?
I'm running 1.1.5 - I installed the mod fine except that I needed to manually make the changes to the XML.template.
The quick edit doesn't work - both when I'm looking at a post or if I want to change a post title from the message index.
Any suggestions?
Waiting for 2.0 B3.1 ver. :)
Quote from: au8ust on July 12, 2008, 08:49:36 PM
Waiting for 2.0 B3.1 ver. :)
You may be waiting a while. It appears the creator has abandoned this mod as they have not responded to anyone since January 24th. Hopefully someone will take it over and fix all the bugs in it
I am curious about the status for this mod. Is the creator still providing support or no? If not, it would help to know this as soon as possible.
I still have an issue with the inline edit (both the quick edit and the edit title from the message index hangs on 'loading') and I would like to have this fixed. I think I've been waiting for about a month now for a response, and I know that others have been waiting even longer to have their issues with it resolved.
It's a very useful mod and I really don't want to uninstall, especially since I would have to do it manually x.x
Quote from: Lady Night Owl on August 01, 2008, 03:41:09 PM
I am curious about the status for this mod. Is the creator still providing support or no? If not, it would help to know this as soon as possible.
I still have an issue with the inline edit (both the quick edit and the edit title from the message index hangs on 'loading') and I would like to have this fixed. I think I've been waiting for about a month now for a response, and I know that others have been waiting even longer to have their issues with it resolved.
It's a very useful mod and I really don't want to uninstall, especially since I would have to do it manually x.x
Did you make the appropriate edits in the xml.template.php file?
Yes, I followed all of the changes as they were listed in the parser, but I'll have another look. :)
I REALLY wish Karl Benson would take over this mod. It IS worthy of his time and I am sure he would remedy the issues and make it totally awesome. In truth, this should be a default feature of SMF 2.0 along with the Drafts mod by Charles Hill!
I think all this thing needs is to appear on the unread/unread replies pages, perhaps I'll look into that myself...
I am using 1.1.5 Babylon and am getting this message when I try to install from the Package Manager, I am gutless and am not confident enough to even thinking about trying to manually installing anything on my forum :o but oh I so would love to have this on my forum.
Is there anyone here that has any clues about this, this is one of my dream features :)
Error in Package Installation
At least one error was encountered during a test installation of this package. It is strongly recommended that you do not continue with installation unless you know what you are doing, and have made a backup very recently. This error may be caused by a conflict between the package you're trying to install and another package you have already installed, an error in the package, a package which requires another package that you don't have installed yet, or a package designed for another version of SMF.
Installations actions for "Topic description":
Installing this package will perform the following actions: Type Action Description
1. Execute Code DB.php
2. Execute Modification ./Sources/Display.php Test successful
3. Execute Modification ./Sources/MessageIndex.php Test successful
4. Execute Modification ./Sources/Post.php Test successful
5. Execute Modification ./Sources/Subs-Post.php Test successful
6. Execute Modification ./Themes/default/index.template.php Test successful
7. Execute Modification ./Themes/default/Display.template.php Test successful
8. Execute Modification ./Themes/default/MessageIndex.template.php Test successful
9. Execute Modification ./Themes/default/Post.template.php Test successful
10. Execute Modification ./Themes/default/Xml.template.php Test failed
11. Execute Modification ./Themes/default/xml_board.js Test successful
12. Execute Modification ./Themes/default/xml_topic.js Test successful
13. Execute Modification ./Themes/default/languages/index.english.php Test successful
can this mod successfully install on 1.1.5?
Yes bfeo, I would like that answer, the 'Test Failed' is the as far as I have gotten, would love this on my forum :)
Lol. I keep checking back here and seeing "Yes bfeo", and thinking you are answering my question. :P
is this for making a description under the subject line? Like so : Subject: Looking for help
Under subject: With this mod please...
If so I NEED THIS BAD! I don't even want to install until someone fixes it.. looks like alot of people are having issues. I'm using SMF 1.1.5.. Can someone just respond and let me know if this is what I think it is.. I haven't seen a link to what it looks like.. one given many post ago seems like there is nothing that matches this mod..
Thanks all!
That is what I understand it to be, linette97, I have seen a SMF Forum with this in action, it is great to work with. I hope this gets looked at soon :)
...
./Themes/default/Post.template.php
For this file, I have multiple \\"subject"\\ lines, so idk where to add \\, "description"\\
Also, this code does not exist
<tr> <td align="right"> <b>', $txt[71], ':</b> </td> <td>
so idk where to add
<!-- //-Topic description MOD- Start --> ', (!empty($context['is_first_post']) ? '<tr> <td align="right" style="font-weight: bold;" id="caption_description"> '. $txt['topic_description']. ': </td> <td> <input type="text" name="description" value="'. $context['description'] .'" tabindex="'. $context['tabindex']++. '" size="80" maxlength="80" /> </td> </tr>':'<input type="hidden" name="description" value="" readonly />') ,' <!-- //-Topic description MOD- End -->
I have 1.1.5
Assistance would be nice.
Thanks Squad for responding! Then if this is what we think it is... then I'm so tempted to install and see what happens... I'll just back up my files... I really need this mod. It helps with my site tremendously. I will install and will post my findings!
...
24 hour bump.
Quote from: bfeo on August 31, 2008, 10:32:41 AM
...
./Themes/default/Post.template.php
For this file, I have multiple \\"subject"\\ lines, so idk where to add \\, "description"\\
Also, this code does not exist
<tr> <td align="right"> <b>', $txt[71], ':</b> </td> <td>
so idk where to add
<!-- //-Topic description MOD- Start --> ', (!empty($context['is_first_post']) ? '<tr> <td align="right" style="font-weight: bold;" id="caption_description"> '. $txt['topic_description']. ': </td> <td> <input type="text" name="description" value="'. $context['description'] .'" tabindex="'. $context['tabindex']++. '" size="80" maxlength="80" /> </td> </tr>':'<input type="hidden" name="description" value="" readonly />') ,' <!-- //-Topic description MOD- End -->
I have 1.1.5
I've said it before and will say one more time. This mod should be made a default feature! I don't want to loose all my topic descriptions when I eventually upgrade to 2.0!!
I would love to see Karl Benson take this mod over!
Quote from: weightman on September 03, 2008, 01:05:16 AM
I've said it before and will say one more time. This mod should be made a default feature! I don't want to loose all my topic descriptions when I eventually upgrade to 2.0!!
I would love to see Karl Benson take this mod over!
.. anyways.
I'm sure we can convert the information that is stored in the database table for the topic descriptions into 2.0 pretty easily, so that data isn't lost.
Apart from wanting this as a Default feature, which would excellent, I would really like to be able to install it a the moment :)
Quote from: bfeo on August 31, 2008, 10:32:41 AM
...
./Themes/default/Post.template.php
For this file, I have multiple \\"subject"\\ lines, so idk where to add \\, "description"\\
Also, this code does not exist
<tr> <td align="right"> <b>', $txt[71], ':</b> </td> <td>
so idk where to add
<!-- //-Topic description MOD- Start --> ', (!empty($context['is_first_post']) ? '<tr> <td align="right" style="font-weight: bold;" id="caption_description"> '. $txt['topic_description']. ': </td> <td> <input type="text" name="description" value="'. $context['description'] .'" tabindex="'. $context['tabindex']++. '" size="80" maxlength="80" /> </td> </tr>':'<input type="hidden" name="description" value="" readonly />') ,' <!-- //-Topic description MOD- End -->
I have 1.1.5
...
./Themes/default/Post.template.php
For this file, I have multiple \\"subject"\\ lines, so idk where to add \\, "description"\\
Also, this code does not exist
<tr> <td align="right"> <b>', $txt[71], ':</b> </td> <td>
so idk where to add
<!-- //-Topic description MOD- Start --> ', (!empty($context['is_first_post']) ? '<tr> <td align="right" style="font-weight: bold;" id="caption_description"> '. $txt['topic_description']. ': </td> <td> <input type="text" name="description" value="'. $context['description'] .'" tabindex="'. $context['tabindex']++. '" size="80" maxlength="80" /> </td> </tr>':'<input type="hidden" name="description" value="" readonly />') ,' <!-- //-Topic description MOD- End -->
I have 1.1.5
Ok bfeo what theme are you using, we have Babylon and like you 1.1.5 :)
BTW thanks for this, it's a shame that it didn't download via the direct Package Manager without problems :)
Although I do enjoy the learning curve I am experiencing, and the fact that so many people help others when they can :)
I just cannot get my head around so much and get frustrated (because I have not been game to attempt most of the modifications manually) that the modifications don't always download without errors. I'm am positive once I've have gotten the guts to try the manual downloads there'll be no stopping me :D
I was using ds-natural from dziner studio and mystic jade from dziner studio. But you can just focus on Mystic Jade, which is my main theme.
someone help me please. :'(
In ./Themes/default/Post.template.php
For this file, I have multiple \\"subject"\\ lines, so idk where to add \\, "description"\\
Also, this code does not exist
<tr> <td align="right"> <b>', $txt[71], ':</b> </td> <td>
so idk where to add
<!-- //-Topic description MOD- Start --> ', (!empty($context['is_first_post']) ? '<tr> <td align="right" style="font-weight: bold;" id="caption_description"> '. $txt['topic_description']. ': </td> <td> <input type="text" name="description" value="'. $context['description'] .'" tabindex="'. $context['tabindex']++. '" size="80" maxlength="80" /> </td> </tr>':'<input type="hidden" name="description" value="" readonly />') ,' <!-- //-Topic description MOD- End -->
I have 1.1.5
Please, can this be safely installed on 1.1.6 Core theme? via the package manager, rather than the manual instructions. :)
Ignored for almost an entire month...
bfeo, Rudolf hasn't been on for a few weeks himself, and I have no idea what you could do.
I too would like some help, will just wait :)
Maybe someone else should take it over?
I know AlanS might be able to do it.
Quote from: squad on September 29, 2008, 11:27:14 AM
Please, can this be safely installed on 1.1.6 Core theme? via the package manager, rather than the manual instructions. :)
Can anyone help, I would really love to have use of this modification :)
Squad, Do you have any other mods installed before this? I'm just curious.
Every 1.1.6 board Ive added this mod to fails on the xml.template.php. Ive always added it after a couple other mods so I just assume that's the conflict is. Ive always edited this by hand after installing the mod even with the test failed. It works just fine.
If you want to attach your xml.template.php Ill be happy to edit it for you.
Now for my problem. Ive recently tried to install this on a site with Blog Community (for 1.1.x) already installed and I'm having conflicts with with the index.template.php.
Granted its not an important one because its just to a meta data field and will run just fine with out the changes to the index template. That said I'm a bit AR sometimes and would like to see it done anyway. LOL
After Blog Community edits the line it looks like this...
<meta name="description" content="' . (!empty($context['blog']['meta']['description']) ? $context['blog']['meta']['description'] : $context['page_title']) . '" />', empty($context['robot_no_index']) ? '' : '
Traditionally after Topic Description edits the line it looks like this...
<meta name="description" content="', $context['page_title'], (!empty($context['description']) ? ' - '. $context['description'] : '') , '" />', empty($context['robot_no_index']) ? '' : '
I'm not sure how the two combined should look as its such a drastic contrast and every way Ive tried to edit the line it breaks the forum.
As for now I'm running the mod without the changes to the index template and both mods work just fine since meta data is really only for search engine robots. Really I just want to know how it should look.
Modified due to lousy grammar. LOL
The first approeach would be to do this:
<meta name="description" content="' . (!empty($context['blog']['meta']['description']) ? $context['blog']['meta']['description'] : $context['page_title'] . (!empty($context['description']) ? ' - '. $context['description'] : '')) . '" />', empty($context['robot_no_index']) ? '' : '
However what the blog mod does is not 100% correct, as it removes the topic title from the description tag. To do the right thing you would have to do:
<meta name="description" content="' . (!empty($context['blog']['meta']['description']) ? $context['blog']['meta']['description'] . ' - ': '') . $context['page_title'] . (!empty($context['description']) ? ' - '. $context['description'] : '') . '" />', empty($context['robot_no_index']) ? '' : '
This way you have: blog description - page title - topic description
Thanks Rudolf,
Ive been banging my head against that code for hours. I cant believe I missed that but then Ive never been a real coder, I just steal someones code and try to make it do what I need. LOL
Great big pats on the back. :)
Quote from: Garou on November 02, 2008, 06:47:37 AM
Squad, Do you have any other mods installed before this? I'm just curious.
Every 1.1.6 board Ive added this mod to fails on the xml.template.php. Ive always added it after a couple other mods so I just assume that's the conflict is. Ive always edited this by hand after installing the mod even with the test failed. It works just fine.
If you want to attach your xml.template.php Ill be happy to edit it for you.
Thank you, I would appreciate yours or anybodies help, but sadly where I
work is in the middle of the biggest week of the year, business wise, so I
am not doing anything but the real necessities to my forum until next week.
I will get back here then, if I have not been tucked into a straight jacket :P
Ok so I checked out the default 1.1.6 files with out any other mods. The fact that this mod wont install on it right, isn't Rudolf's fault.
Whomever was responsible for parsing the changes in the default files, left a lot of crumbs in it because according to the Installation Instructions for 1.1.6 (http://custom.simplemachines.org/mods/index.php?action=parse;mod=606;attach=47382;smf_version=1.1.6), when the mod is looking for say...
<subject>', $context['message']['subject'], ']]></subject>
it cant find it because in the Xml.template.php Im seeing...
<subject><![CDATA[', $context['message']['subject'], ']]></subject>
To the best of my knowledge the CDATA tags should not have been parsed into the xml template when they were originally modified. I could be wrong and this was done by design but I don't really think so.
So the fix is to either get the Simple Machines staff to update the 1.1.6 install file (which I doubt will happen because they are working so hard on the 2.0 updates) or for Rudolf to re-write the themes.xml in his package to accommodate for this. In the end I think it would just be easier for us to change that one file by hand.
In any case I'm attaching a copy of my hand converted 1.1.6 Xml.template.php. As long as you don't have any other mods that edit 1.1.6 Xml.template.php installed or your working with a clean install of SMF 1.1.6, meaning this is the first mod your installing, this should work for you.
I'm experiencing an issue with ./Themes/default/Xml.template.php, installing on 1.1.7. It's the only file that returns an error using the package installation:
10. Execute Modification ./Themes/default/Xml.template.php Test failed
I'm using 1.1.7 with the default theme, with no other mods installed.
I've tried manually editing Xml.template to the manual settings but still a failed test. I haven't tried a complete manual install with all the other files when really the issue is just the Xml.template.php file - or am I wrong?
Attempting to install as is results in a blank white screen. This mod should be able to install itself via the package manager, without doing a complet manual install, shouldn't it?
read the post above yours
Please update it to work with 2.0 Beta 4.
Is there a way to fix the quick modify? It gets stuck at loading..... And I tried re-editing the xml.template using the parser and nothing seems to work =./
I hope also this one will be update to 2.0 rc1
I would really like this to be able to be included on
both 1.1.8 and 2.0 - that would be fantastic :) :)
Somebody can help to put on SMF 2.0 this package?
Somebody would not be able to prepare refreshing this package possibly? :/
hey, how would i change the description to be smaller text size? I know to do it but i can't find were to change the code. Anybody know?
is there any way to install this mod more then once, so that I can have multiple description within my post...
Topic Description
Topic Description 2
Topic Description 3
Topic Description 4
and so on..
Would Garou's description in reply 214 work for 1.1.8? If not, what further alterations would need to be made? Would I have to uninstall all of my other mods?
It should work just as I stated. However I'm surprised they didn't fix this when they released 1.1.8.
Without actually trying it out myself I'm pretty sure that no other changes would need to be made unless you have other mods that already modify those same files on the same line. Then it would just take a bit of hand modifying to make them work together. So no you should not have to remove any existing mods.
I'm not positive I'm doing everything right. I assume I was supposed to replace the Xml.template.php file with the one that had been provided? There is still an error with 1.1.8 and I'm not really sure how to go about editing that.
Also to avoid conflicting mods right now I just went ahead and deleted the other mods as a precaution. Not much had been done with them anyways.
actually I meant removing the CDATA stuff. The actual file may have changed a little but I noticed that the CDATA lines are still in there.
So I should remove the CData stuff from the original xml file?
I'm sorry if I'm coming off as dense ><
If you look at http://custom.simplemachines.org/mods/index.php?action=parse;mod=606;attach=47382;smf_version=1.1.4 the manual install instructions youll see that the mod is looking for...
<subject>', $context['message']['subject'], ']]></subject>
However in the actual file it looks like...
<subject><![CDATA[', $context['message']['subject'], ']]></subject>
![CDATA[
is not supposed to be in the file. When it was last updated the program the used to edit it messed up the file and SMF hasnt fixed it yet. There are several occurrences of this that needs to be fixed in in the file in order for the mod to install on its own.
You can either fix the file to remove that stuff then install the mod or you can unzip the mod, update the mod to match the files, zip it back up and then install the mod. I say its easier to edit the file. Its also the right thing to do. :)
I'm new to this discussion and have to ask a totally ignorant question (since I just don't know), but I see Categories and Boards in my administrative panel, but I don't see the word "topics"; so what's a Topic Description?
CarpeDiem, You wouldn't see anything to set this in your board settings, once the mod is installed your users will be able to add a topic description when they create a new post.
I tried installing this mod, but this is what i get:
10. Execute Modification ./Themes/default/Xml.template.php Test failed
Does anyone know what I need to change manually to make this mod work? (my forum runs on 1.1.9 + TinyPortal v1.0 beta 3 )
Thanks.
Garou,
Thank you very much for your explanation. I couldn't figure out where I would see this, and now I can visualize it well.
navin.p, http://www.simplemachines.org/community/index.php?topic=139270.msg2065603#msg2065603
Is there any way that I can make the Topic Description in italics? Thanks!
i need some help
description doesnt show when try to modify topic
when i install mod i got those erros (SMF 1.1.10)
Type Action Description
1. Execute Code DB.php
2. Execute Modification ./Sources/Display.php Test successful
3. Execute Modification ./Sources/MessageIndex.php Test successful
4. Execute Modification ./Sources/Post.php Test successful
5. Execute Modification ./Sources/Subs-Post.php Test successful
6. Execute Modification ./Themes/default/index.template.php Test failed
7. Execute Modification ./Themes/default/Display.template.php Test successful
8. Execute Modification ./Themes/default/MessageIndex.template.php Test successful
9. Execute Modification ./Themes/default/Post.template.php Test successful
10. Execute Modification ./Themes/default/Xml.template.php Test failed
11. Execute Modification ./Themes/default/xml_board.js Test successful
12. Execute Modification ./Themes/default/xml_topic.js Test successful
13. Execute Modification ./Themes/default/languages/index.english.php Test successful
also I changed files manually but error still
does anyone nows whot should i do?
thanks!
The install errors have nothing to do with the description not showing when you go to modify the post.
The problem is when the field comes up it should be pulling the info from the database with some sort of get statement and apparently it isn't. Back when I was looking at updating the mod to 2.x I came across that myself, I just never got the time to try and find the fix.
Ill take a look at it again in a few days when I get some spare time. That is unless Rudolf (the author of the mod) gets to it before I do. He hasn't posted here in a while so I don't know if hes still supporting the mod or not.
thanks Garou, ill be waiting for your reply, and try to fix my own too
cheers
sum1 help me.....it seems that query from database is lost....
any clue?
ok, already fixed that. Problem was when it loads data from post you want to modify, descprition wasnt an argument on database query.
To fix it, open Post.php, then find this line:
// Get the existing message.
$request = db_query("
SELECT
m.ID_MEMBER, m.modifiedTime, m.smileysEnabled, m.body,
m.posterName, m.posterEmail, m.subject, m.icon,
IFNULL(a.size, -1) AS filesize, a.filename, a.ID_ATTACH,
t.ID_MEMBER_STARTED AS ID_MEMBER_POSTER, m.posterTime
FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t)
LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MSG = m.ID_MSG AND a.attachmentType = 0)
WHERE m.ID_MSG = " . (int) $_REQUEST['msg'] . "
AND m.ID_TOPIC = $topic
AND t.ID_TOPIC = $topic", __FILE__, __LINE__);
// The message they were trying to edit was most likely deleted.
Replace by:
// Get the existing message.
$request = db_query("
SELECT
m.ID_MEMBER, m.modifiedTime, m.smileysEnabled, m.body,
m.posterName, m.posterEmail, m.subject, m.description, m.icon,
IFNULL(a.size, -1) AS filesize, a.filename, a.ID_ATTACH,
t.ID_MEMBER_STARTED AS ID_MEMBER_POSTER, m.posterTime
FROM ({$db_prefix}messages AS m, {$db_prefix}topics AS t)
LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MSG = m.ID_MSG AND a.attachmentType = 0)
WHERE m.ID_MSG = " . (int) $_REQUEST['msg'] . "
AND m.ID_TOPIC = $topic
AND t.ID_TOPIC = $topic", __FILE__, __LINE__);
// The message they were trying to edit was most likely deleted.
now its should work!
Hello.
Can I get to work this wonderful module to version 2 RC2 ?
I'm not sure if the author is supporting this mod anymore well have to see if he pops in. In the meantime I'm updating the mod for my own personal use. Once I get it working Ill post it up here.
Quote from: Garou on November 12, 2009, 12:10:13 AM
I'm not sure if the author is supporting this mod anymore well have to see if he pops in. In the meantime I'm updating the mod for my own personal use. Once I get it working Ill post it up here.
He was last active here yesterday. Maybe shoot him a PM?
Quote from: wihr on November 11, 2009, 11:13:14 AM
Hello.
Can I get to work this wonderful module to version 2 RC2 ?
You might try Topic Note (http://custom.simplemachines.org/mods/index.php?mod=1906) instead. It installs like a champ on RC2, and a couple of quick tweaks with the display template will make it behave exactly like 1.x Topic Description.
Quote from: Garou on November 12, 2009, 12:10:13 AM
I'm not sure if the author is supporting this mod anymore well have to see if he pops in. In the meantime I'm updating the mod for my own personal use. Once I get it working Ill post it up here.
i cannot wait for try it thx garou
We have submitted the mod for the customization team to review at http://custom.simplemachines.org/mods/index.php?mod=2281 under Balance Games rather then myself, it hasn't been approved yet. Im guessing its due to the fact that it installs fine on a fresh copy of SMF RC2 but sometimes it has problems on upgraded versions.
It is available at Balance SMF http://smf.balancegames.net/index.php?action=mgallery;sa=album;id=8 and we have a package parser available if you need to make manual edits to make it work on your site.
Interesting, you didn't mention that part.
Curious - do other users have access to that account? (You normally have to request permission for doing that first.)
Btw, I sent a PM to the mod author's account earlier with a list of issues we found.
Quote from: Garou on November 24, 2009, 06:33:52 AM
We have submitted the mod for the customization team to review at http://custom.simplemachines.org/mods/index.php?mod=2281 under Balance Games rather then myself, it hasn't been approved yet. Im guessing its due to the fact that it installs fine on a fresh copy of SMF RC2 but sometimes it has problems on upgraded versions.
It is available at Balance SMF http://smf.balancegames.net/index.php?action=mgallery;sa=album;id=8 and we have a package parser available if you need to make manual edits to make it work on your site.
Applied and modificate in some point work ok ony i have some of these erros:
Quote8: Undefined variable: func
Applica filtro: Mostra solo gli errori relativi a questo file
File: /home/crazyzone/data/www/crazyzone.biz/Sources/Post.php
Riga: 411
Line 411 is:
$func['htmltrim']($_REQUEST['description']); //-Topic description MOD-And doing preview this is the error:
QuoteFatal error: Function name must be a string in /home/crazyzone/data/www/crazyzone.biz/Sources/Post.php on line 411
some solution garou ?
Arantor, I'm the only one that has access to the account, the plan is once a mod gets approved the other members from the team will be listed as additional authors. While yes I know I can do this under my own name we would rather have something identifying the team as a whole rather then an individual member. As there are other collaborative teams working on SMF Mods I wasn't aware there was an issue with this nor that there was a process.
In your PM you mention that you contacted Rudof and he is planning on updating the mod? As there hasn't been an update to the mod since 2007 nor has he posted in this thread in about a year ignoring the users, it was assumed that this is an abandoned mod.
There is a plethora of highly used and useful mods here on SMF that the authors no longer support even if their accounts have been used recently and its just a shame to see such a mod waste away.
Even though the mod worked on our test site the mod is no longer downloadable from our site and the Balance_Games account here has been deleted.
Hopefully the author does update the mod.
You misinterpreted what I said. I never mentioned anything of Rudolf. There is another mod, by Akyhne, that does almost the same as this - as I linked in the PM I sent, which I have been told will be updated for RC2 very shortly, and is already available for 2.0 RC1.2: http://custom.simplemachines.org/mods/index.php?mod=1906
I am sorry if I sounded harsh in my communication; we do allow group accounts under specific circumstances but as you can imagine when it is being used for distribution of mods we do have to be careful about it (not to mention that such things have been used before in a manner to get around bans); you'll note mods like SMF Media Gallery were submitted by "SMG Team", for example.
Quote from: Arantor on November 25, 2009, 06:58:55 AM
You misinterpreted what I said. I never mentioned anything of Rudolf. There is another mod, by Akyhne, that does almost the same as this - as I linked in the PM I sent, which I have been told will be updated for RC2 very shortly, and is already available for 2.0 RC1.2: http://custom.simplemachines.org/mods/index.php?mod=1906
I am sorry if I sounded harsh in my communication; we do allow group accounts under specific circumstances but as you can imagine when it is being used for distribution of mods we do have to be careful about it (not to mention that such things have been used before in a manner to get around bans); you'll note mods like SMF Media Gallery were submitted by "SMG Team", for example.
That mod is not very similar.
Topic description with the description displayed below the topic in the topic list is best, since it is annoying as hell to wait for the tooltip or whatever that other mod does to come up and then read it without moving the mouse.
I hope the issue gets resolved and Garou and friends can update this wonderful mod for SMF 2.
It is in fact very similar. :) Just add $topic['topic_note'] to your MessageIndex.template.php below the if string for "Is this topic new?".
There are also issues with updating another author's mods without their permission.
I am using 2.0 RC2. Installation fails cos of failed tests.
Will this mod or any similiar work for this version of SMF?
It won't work for 2.0 RC2 on account of the fact it hasn't been updated (as the mod's description says)
Try searching for Topic Note; I believe the author of that mod has updated it (or if he hasn't it's not far away)
I would love to get this Mod.. been waiting for a year now.. & I took a look at the Mod.. "Topic Note" Since ppl are saying it is similar & can be tweaked.. do not understand how that can be done. Can someone explain a bit more.
Hope This mod gets fixed & upgraded soon!!
Thanks all!
Ask in the thread for Topic Note about what you actually want tweaked.
Quote from: Arantor on December 11, 2009, 02:15:37 AM
Ask in the thread for Topic Note about what you actually want tweaked.
I did that already and the creator said it was not possible. (guess he didn't want to tell me) the way the mod is setup is not like this mod... I'll just wait until someone fixes this one! Thanks!
any breakthrough ?
i like this mod also, but it keeps reporting errors when i try to install it.
best and thx
I covered the install issue a long time ago
Quote from: Garou on November 03, 2008, 04:37:08 AM
Ok so I checked out the default 1.1.6 files with out any other mods. The fact that this mod wont install on it right, isn't Rudolf's fault.
Whomever was responsible for parsing the changes in the default files, left a lot of crumbs in it because according to the Installation Instructions for 1.1.6 (http://custom.simplemachines.org/mods/index.php?action=parse;mod=606;attach=47382;smf_version=1.1.6), when the mod is looking for say...
<subject>', $context['message']['subject'], ']]></subject>
it cant find it because in the Xml.template.php Im seeing...
<subject><![CDATA[', $context['message']['subject'], ']]></subject>
To the best of my knowledge the CDATA tags should not have been parsed into the xml template when they were originally modified. I could be wrong and this was done by design but I don't really think so.
So the fix is to either get the Simple Machines staff to update the 1.1.6 install file (which I doubt will happen because they are working so hard on the 2.0 updates) or for Rudolf to re-write the themes.xml in his package to accommodate for this. In the end I think it would just be easier for us to change that one file by hand.
In any case I'm attaching a copy of my hand converted 1.1.6 Xml.template.php. As long as you don't have any other mods that edit 1.1.6 Xml.template.php installed or your working with a clean install of SMF 1.1.6, meaning this is the first mod your installing, this should work for you.
In the quote I mention something about the CDATA statements not supposed to be in the file, this is not entirely correct Ive recently learned that there might be valid reasons for doing this.
Unfortunately there is an issue with the way the package manager handles this because CDATA is used as a reference when packaging a mod. I have to wonder if this isn't part of the reason why support for the mod was dropped.
In any case you will have to install the mod with errors and make the changes to the file manually.
Also when I was working on upgrading this myself I realized that if you just install the mod with errors and not try to fix the file, most functions of the mod will work. Though there may be a problem if you use quick edit to modify an existing post.
it seems that it doesn't work with 1.1.11, i can't use it, forum just doesn't offer it.
The problem is that the author of the mod has not updated the mod or even participated in this thread for a very long time. In other words its unsupported.
That said you may be able to make it work by applying the changes listed in the parser manually as not much has changed since the mod was last updated and the current version of SMF. I believe others have gotten it to work with the latest version.
I have done the modification manually on my SMF 2.0 RC, and it work perfectly.
1. first of all create the field on the Database: on "smf_messages" create the field "description". Type:VARCHAR, Lenght:255.
This is the code i have modify:
On .Sources/display.php
$context['subject'] = $topicinfo['subject'];
$context['description'] = censorText($topicinfo['description']); //-Topic description MOD-
ms.subject,
ms.description,
on ./Sources/MessageIndex.php
'id' => $row['ID_TOPIC'],
'description' => $row['description'],//-Topic description MOD-
censorText($row['first_Body']);
censorText($row['description']); //-Topic description MOD-
mf.subject AS first_Subject,
mf.description,
on ./Sources/Post.php
$context['post_error']['long_message'] = true;
htmltrim__recursive(htmlspecialchars__recursive($_REQUEST['description'])); //-Topic description MOD-
if (!isset($_REQUEST['subject']))
$_REQUEST['subject'] = '';
if (!isset($_REQUEST['description'])) //-Topic description MOD-
$_REQUEST['description'] = ''; //-Topic description MOD-
// Any errors occurred?
//-Topic description MOD- Start
$form_description = strtr($smcFunc['htmlspecialchars'](stripslashes($_REQUEST['description'])), array("\r" => '', "\n" => '', "\t" => ''));
if ($smcFunc['strlen']($form_description) > 200)
$form_description = $smcFunc['substr']($form_description, 0, 200);
//-Topic description MOD- End
censorText($context['preview_subject']);
if (!isset($_POST['description'])) $_POST['description'] = ''; //-Topic description MOD-
// At this point, we want to make sure the subject isn't too long.
//-Topic description MOD- Start
if (!isset($_POST['description']))
$_POST['description'] = '';
if ($smcFunc['strlen']($_POST['description']) > 200)
$_POST['description'] = addslashes($smcFunc['substr'](stripslashes($_POST['description']), 0, 200));
$_POST['description'] = strtr($smcFunc['htmlspecialchars']($_POST['description']), array("\r" => '', "\n" => '', "\t" => ''));
//-Topic description MOD- End
'subject' => isset($_POST['subject']) ? $_POST['subject'] : null,
'description' => isset($_POST['description']) ? $_POST['description'] : null,
if (isset($_POST['message']))
//-Topic description MOD- Start
if (isset($_POST['description']))
{
$_POST['description'] = strtr($func['htmlspecialchars']($_POST['description']), array("\r" => '', "\n" => '', "\t" => ''));
// Maximum number of characters.
if ($smcFunc['strlen']($_POST['description']) > 200)
$_POST['description'] = $smcFunc['substr']($_POST['description'], 0, 200);
}
else $_POST['description'] = '';
//-Topic description MOD- End
m.poster_Email, m.subject,
2 times
m.description,
m.ID_TOPIC, m.subject
, m.description
'subject' => $_POST['subject'],
'description' => $_POST['description'], //-Topic description MOD-
$form_subject = $row['subject'];
$form_description = $row['description']; //-Topic description MOD-
$context['subject'] = addcslashes($form_subject, '"');
$context['description'] = isset($form_description) ? addcslashes($form_description, '"') : ''; //-Topic description MOD-
'subject' => isset($_POST['subject']) ? $_POST['subject'] : null,
'description' => isset($_POST['description']) ? $_POST['description'] : null,
'subject' => addcslashes($row['subject'], '"'),
'is_first_post' => $is_first_post, //-Topic description MOD-
'description' => $is_first_post ? addcslashes($row['description'], '"') : '', //-Topic description MOD-
'subject' => $msgOptions['subject'],
'description' => $msgOptions['description'], //-Topic description MOD-
'subject' => isset($msgOptions['subject']) ? $msgOptions['subject'] : '',
'description' => isset($msgOptions['description']) ? $msgOptions['description'] : '', //-Topic description MOD-
on ./Sources/Subs-Post.php
// Insert the post.
// Insert the post. -Topic description MOD- query modified
'id_member' => 'int', 'subject' => 'string-255',
'description' => 'string-255',
$msgOptions['subject'],
$msgOptions['description'],
$messages_columns['subject'] = $msgOptions['subject'];
if (isset($msgOptions['description'])) //-Topic description MOD-
$messages_columns['description'] = $msgOptions['description']; //-Topic description MOD-
Another modification is needed.
In the original mod. the author as missed the topic move.
When a topic was moved you can't leave a topic with the topic-redirection.
with this modify now you can move the topic with a redirect:
on .source/MoveTopic.php
'subject' => $txt['moved'] . ': ' . $subject,
'description' => '',
This is only the modification about the "source" code.
The template code is based on your template.
P.S. This is not "official" modification, is based on this mod. But in my forum it work
P.P.S. sorry for my bad english, i'm italian
Quote from: the giox on February 14, 2010, 05:55:26 PM
I have done the modification manually on my SMF 2.0 RC, and it work perfectly.
1. first of all create the field on the Database: on "smf_messages" create the field "description". Type:VARCHAR, Lenght:255.
This is the code i have modify:
On .Sources/display.php
$context['subject'] = $topicinfo['subject'];
$context['description'] = censorText($topicinfo['description']); //-Topic description MOD-
ms.subject,
ms.description,
on ./Sources/MessageIndex.php
'id' => $row['ID_TOPIC'],
'description' => $row['description'],//-Topic description MOD-
censorText($row['first_Body']);
censorText($row['description']); //-Topic description MOD-
mf.subject AS first_Subject,
mf.description,
on ./Sources/Post.php
$context['post_error']['long_message'] = true;
htmltrim__recursive(htmlspecialchars__recursive($_REQUEST['description'])); //-Topic description MOD-
if (!isset($_REQUEST['subject']))
$_REQUEST['subject'] = '';
if (!isset($_REQUEST['description'])) //-Topic description MOD-
$_REQUEST['description'] = ''; //-Topic description MOD-
// Any errors occurred?
//-Topic description MOD- Start
$form_description = strtr($smcFunc['htmlspecialchars'](stripslashes($_REQUEST['description'])), array("\r" => '', "\n" => '', "\t" => ''));
if ($smcFunc['strlen']($form_description) > 200)
$form_description = $smcFunc['substr']($form_description, 0, 200);
//-Topic description MOD- End
censorText($context['preview_subject']);
if (!isset($_POST['description'])) $_POST['description'] = ''; //-Topic description MOD-
// At this point, we want to make sure the subject isn't too long.
//-Topic description MOD- Start
if (!isset($_POST['description']))
$_POST['description'] = '';
if ($smcFunc['strlen']($_POST['description']) > 200)
$_POST['description'] = addslashes($smcFunc['substr'](stripslashes($_POST['description']), 0, 200));
$_POST['description'] = strtr($smcFunc['htmlspecialchars']($_POST['description']), array("\r" => '', "\n" => '', "\t" => ''));
//-Topic description MOD- End
'subject' => isset($_POST['subject']) ? $_POST['subject'] : null,
'description' => isset($_POST['description']) ? $_POST['description'] : null,
if (isset($_POST['message']))
//-Topic description MOD- Start
if (isset($_POST['description']))
{
$_POST['description'] = strtr($func['htmlspecialchars']($_POST['description']), array("\r" => '', "\n" => '', "\t" => ''));
// Maximum number of characters.
if ($smcFunc['strlen']($_POST['description']) > 200)
$_POST['description'] = $smcFunc['substr']($_POST['description'], 0, 200);
}
else $_POST['description'] = '';
//-Topic description MOD- End
m.poster_Email, m.subject,
2 times
m.description,
m.ID_TOPIC, m.subject
, m.description
'subject' => $_POST['subject'],
'description' => $_POST['description'], //-Topic description MOD-
$form_subject = $row['subject'];
$form_description = $row['description']; //-Topic description MOD-
$context['subject'] = addcslashes($form_subject, '"');
$context['description'] = isset($form_description) ? addcslashes($form_description, '"') : ''; //-Topic description MOD-
'subject' => isset($_POST['subject']) ? $_POST['subject'] : null,
'description' => isset($_POST['description']) ? $_POST['description'] : null,
'subject' => addcslashes($row['subject'], '"'),
'is_first_post' => $is_first_post, //-Topic description MOD-
'description' => $is_first_post ? addcslashes($row['description'], '"') : '', //-Topic description MOD-
'subject' => $msgOptions['subject'],
'description' => $msgOptions['description'], //-Topic description MOD-
'subject' => isset($msgOptions['subject']) ? $msgOptions['subject'] : '',
'description' => isset($msgOptions['description']) ? $msgOptions['description'] : '', //-Topic description MOD-
on ./Sources/Subs-Post.php
// Insert the post.
// Insert the post. -Topic description MOD- query modified
'id_member' => 'int', 'subject' => 'string-255',
'description' => 'string-255',
$msgOptions['subject'],
$msgOptions['description'],
$messages_columns['subject'] = $msgOptions['subject'];
if (isset($msgOptions['description'])) //-Topic description MOD-
$messages_columns['description'] = $msgOptions['description']; //-Topic description MOD-
Thanks, just need to put the author
I've added new source code for movetopic.php
Please don't quote all the post ;)
Quote from: the giox on February 15, 2010, 05:14:16 PM
I've added new source code for movetopic.php
Please don't quote all the post ;)
you can create a package for smf2 please ? :-[ :-[ :-[ :-[
Quote from: Am' on February 15, 2010, 05:36:56 PM
Quote from: the giox on February 15, 2010, 05:14:16 PM
I've added new source code for movetopic.php
Please don't quote all the post ;)
you can create a package for smf2 please ? :-[ :-[ :-[ :-[
No sorry... i'va made all my modify by manual.
This is only an help to everything need this mod. on 2.0 RC2.
I've tested in the curve theme and this is for that template:
on ./Themes/default/Display.template.php<span id="top_subject">', $txt['topic'], ': ', $context['subject'], ' (', $txt['read'], ' ', $context['num_views'], ' ', $txt['times'], ')</span>
</h3>
<h3 class="catbg"><span class="left"></span>
<span id="description">', $txt['topic_description'], ': ', $context['description'], '</span>
sTemplateSubjectEdit: ', JavaScriptEscape('<input type="text" style="width: 90%;" name="subject" value="%subject%" size="80" maxlength="80" tabindex="6" class="input_text" />'), ',
sTemplateDescriptionEdit: ',JavascriptEscape('<input type="text" style="width: 90%;" name="description" value="%description%" size="60" maxlength="80" tabindex="6" class="input_text"/>'),',
<input type="submit" name="post" value="', $txt['post'], '" onclick="return submitThisOnce(this);" accesskey="s" tabindex="2" class="button_submit" />
<input type="hidden" name="description" value="" readonly /><!-- //-Topic description MOD- -->
on ./Themes/default/MessageIndex.template.php<p>', $txt['started_by'], ' ', $topic['first_post']['member']['link'], '
<br /><span id="msg_descr_' , $topic['first_post']['id'] , '" class="topic_description">',$topic['description'],'</span>',' <!-- //-Topic Description MOD- -->
setInnerHTML(cur_subject_div, \'<input type="text" name="subject" value="\' + subject + \'" size="60" style="width: 95%;" maxlength="80" onkeypress="modify_topic_keypress(event)" class="input_text" /><input type="hidden" name="topic" value="\' + cur_topic_id + \'" /><input type="hidden" name="msg" value="\' + cur_msg_id.substr(4) + \'" />\');
setInnerHTML(cur_description_div, \'<input type="text" name="description" value="\' + description + \'" size="60" style="width: 99%;" maxlength="80" onkeypress="modify_topic_keypress(event)" />\');
setInnerHTML(cur_subject_div, \'<a href="', $scripturl, '?topic=\' + cur_topic_id + \'.0">\' + subject + \'<\' +\'/a>\');
setInnerHTML(cur_description_div, description);
on ./Themes/default/Post.template.phpvar textFields = ["subject",
"description",
<dt>
', $txt['message_icon'], ':
<!-- //-Topic description MOD- Start -->
', (!empty($context['is_first_post']) ?
'
<dt align="right" style="font-weight: bold;" id="caption_description">
'. $txt['topic_description']. ':
</dt>
<dd>
<input type="text" name="description" value="'. $context['description'] .'" tabindex="'. $context['tabindex']++. '" size="80" maxlength="80" />
</dd>
':'<input type="hidden" name="description" value="" readonly />') ,'
<!-- //-Topic description MOD- End -->
on ./Themes/default/languages/index.english.php?>
$txt['topic_description'] = 'Description'; //-Topic description MOD-
on ./Themes/default/css/index.css#forumposts h3 span#top_subject
#description
#forumposts h3 img
{
float: left;
margin: 4px 0.5em 0 0;
}
#forumposts h3 span#description
{
margin: 0 0 0 12.7em;
}
I haven't modify Xml.template.php
This mod is near impossible to create a package for anyway. For instance in ./Sources/Post.php contains a bit of code that is identical in a couple places the package parser will end up adding the code to the first instance twice. So to make it work correctly you would have to have the package make the first change with the mod and manually add the second one.
The package parser also has issues with the code in the Xml.template.php as it has cdata commands in the file and the code you put in the package to update the file. The parser uses cdata lines as reference points for inserting code as well. This is what was causing the mod to fail on install in 1.1 and the same would happen in 2.0
No matter how you slice it you would have to make some changes manually in order to get this to work right and as such I'm sure SMF wouldn't approve the mod under their current terms for modifications.
I'm running 1.1.11 and I'd like to try this mod... but will the "handmade" changes posted above by the giox work since he said he was running SMF2?
I'm guessing not.... But if it does...
Anyone willing to tell me how he made the changes he made to the Database as he lists as kind-of the first step?
No that is the changes to make it work on 2.0 RC2
For 1.1.11 would be to download the original mod and install it with errors and or make manual changes using http://custom.simplemachines.org/mods/index.php?action=parse;mod=606;attach=47382;smf_version=1.1.11
One thing you have to note in the ./Sources/Post.php there is a line that says...
Find:
m.posterEmail, m.subject,
Add After:
m.description,
There are actually two sections that that change is called for, im not sure that it shows in the parsed instructions but if you know how to read an install file you will see it. The thing is that the way the package manager works it will end up adding the line to the first instance twice rather then trying to find the second instance. You will have to add it to the second instance manually.
The other issue you will run into and actually causes the mod to fail in install is in ./Themes/default/Xml.template.php.
In the manual instructions it says to find
<subject>', $context['message']['subject'], ']]></subject>
however in the actual file it reads as....
<subject><![CDATA[', $context['message']['subject'], ']]></subject>
There are multiple instances of this and the way the package manager works using CDATA lines to find and replace code from the mod it is impossible to change a line like that using the package manager. All changes to that file will also have to be done manually and when searching in the actual files they will be hard to find because the parser ignores the CDATA lines in the same way the package manger does.
Because of these issues you will probably never see an official updated package of this mod for 1.1.x or 2.0.x as they have the exact same problems. The only way to truly make this work is to make at least some of the changes changes manually and as such SMF wouldn't approve a new mod and I think that's part of the reason the author no longer supports the existing one.
Well, I needed this pretty bad for my SMF 2.0 RC3. And I don't want to have to re-apply the modifications manually on RC4 and gold.
So here is a package that contains the manual 2.0 RC2 modifications listed by Blackdozer, modified to work with RC3.
I think I love you for doing that Sheepy
Quote from: Sheepy on August 07, 2010, 09:07:18 AM
Well, I needed this pretty bad for my SMF 2.0 RC3. And I don't want to have to re-apply the modifications manually on RC4 and gold.
So here is a package that contains the manual 2.0 RC2 modifications listed by Blackdozer, modified to work with RC3.
damn it has multiple errors on RC4.
for smf 2 rc4????????????
I hope, beg this modification is able to be update to be used with SMF 2.0 RC4 & the
future versions as I find this the most useful and best modification I've used.
Quote from: Garou on February 15, 2010, 09:57:15 PM
This mod is near impossible to create a package for anyway. For instance in ./Sources/Post.php contains a bit of code that is identical in a couple places the package parser will end up adding the code to the first instance twice. So to make it work correctly you would have to have the package make the first change with the mod and manually add the second one.
Unfortunately the package manager was crippled in 1.1 to don't allow multiple search/replace of the same operation.
See this (http://www.simplemachines.org/community/index.php?topic=135367.0) discussion and this (http://dev.simplemachines.org/mantis/view.php?id=325) bug report for more information on the subject. However I used workarounds to be able to make all the changes automatically.
As for the CDATA issue.
There was a bug introduced in 1.1.5 in which the parser fails to parse nested CDATA tags correctly.
To fix it:
In Subs-Package.php
// Handle Cdata blocks.
elseif (!$inComment && $part === '<![CDATA[')
// Handle Cdata blocks.
elseif (!$inComment && !$inCdata && $part === '<![CDATA[')
Unfortunately that's not something I can fix. Apply this small change in your Subs-Package.php file before trying to install, and the mod should install just fine on a vanilla SMF 1.1.13. It does for me.
As for people wanting a version for 2.0.
I was planning to update it once the final 2.0 came out. 4 years ago!
I might still update it.
But for god's sake, don't hold your breath!!!
Quote from: Rudolf on February 18, 2011, 07:21:04 PM
Quote from: Garou on February 15, 2010, 09:57:15 PM
This mod is near impossible to create a package for anyway. For instance in ./Sources/Post.php contains a bit of code that is identical in a couple places the package parser will end up adding the code to the first instance twice. So to make it work correctly you would have to have the package make the first change with the mod and manually add the second one.
Jeez, I didn't realize this was one year ago. :o
Rudolph!!!
Glad to see you back in this thread.
When I was working on a version for RC2 it didn't have the same issue with installing. While it has the same thing with having to edit the same code in multiple places, for the second instance the default SMF code was using extra white space. I dont know if this still holds true in RC5 though. I tossed all my notes and code... Well, Id rather not get into it but I do remember that much.
Will this mod ever be compatible with RC5?
Quote from: helike13 on April 16, 2011, 02:02:29 PM
Will this mod ever be compatible with RC5?
RC5 :P :-X :-* O:) :laugh: ;D :D ;) :)
rc5??
Yes, SMF 2.0 RC5.
If you scroll down this page, you'll see it after "Powered by". :P
I want to start an orchid forum and this mod will be essential to add all genus to the topic of an alliance. Example: in the topic of Cattleya alliance, I will add "Cattleya alliance" in the topic subject and will add "Brassavola, Broughtonia, Cattleya, Encyclia, Epidendrum, Guarianthe, Laelia, Myrmecophila, Sophronitis" in the topic description to prevent users starting out new topic for their Epidendrum.
Anyone can update Topic Description package to make it to work with RC 5?
Is Rudolf the only person that can do it?
Project Evolution is making a mod which is RC5 ready.
Quote from: helike13 on May 17, 2011, 08:45:42 AM
Project Evolution is making a mod which is RC5 ready.
Where do you see it?
http://www.simplemachines.org/community/index.php?topic=429917.msg3020525#msg3020525
Quote from: helike13 on May 17, 2011, 01:16:45 PM
http://www.simplemachines.org/community/index.php?topic=429917.msg3020525#msg3020525
Thank you ;)