News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Topic View disabled with Large text

Started by mrhope, September 22, 2010, 02:06:10 AM

Previous topic - Next topic

mrhope

I've recently updated to 2.0RC3. In the"Profile Fields" under "Features and Options", when selecting "large text" in the drop-down it un-checks the "Topic View" check box.  After doing some debugging I found that it's in the admin.template.php file that's causing this. Just curious if this is a bug or if it's something done for a reason.

The profile views this custom profile field with no issues, but it seems to be using $field['output_html'] instead of $custom['value'] and can't seem to load output_html in display.php.

FILE: Themes\default\Admin.template.php

// Cannot show this on the topic
if (curType == "textarea" || privStatus >= 2)
{
document.getElementById("display").checked = false;
document.getElementById("display").disabled = true;
}


I needed to remove this code because I have been using the custom profile mod with a 1.x version of SMF and after updating to 2RC3 was planning on just substituting that mod for the new Custom Profile Fields.

Oya

what 'topic view' gets unchecked where? I dont remember that in smf anywhere

Kindred

your description, as noted, leaves something to be desired.

What screen are you on where you are choosing "large text" which has "topic view" checkbox?

Also, if you have a problem with how a mod (which is not designed for 2.0, since the functionality is already added into the core product) interacts with existing code, then take it up with the mod author.... it's not a smf core bug...  (or did I misunderstand your issue? As I said, your description is unclear.) :(
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

mrhope

Sorry for the confusion. Hope the below text helps explain where I'm at better.

1. I enabled Advanced Profile Fields in the Core Features under admin.
2. In the Profile Fields I created a new field.
3. In the Add Profile Field section if I click the drop-down on Field Type under Input Settings it unchecks the Show on Topic View: checkbox.

Oya

not sure that's a bug

large text is a big textbox which can contain a lot of information which would be placed every time that user was on a page

imagine you used it for like a "biographical" field for a bit about that user, user adds a paragraph, you wouldn't want that paragraph to show up multiple times a page

mrhope

I can understand that thought process. But personally I needed this ability since, I wanted to allow users to post a lot of text in there profiles. In my situation I'm allowing users to post their system specifications. I wrap this information in a tool tip so it's only shown if the user hovers over the link to display the information as shown in attachment.

In any case I was able to customize this on my forum, I just don't think a user not familiar with PHP would know how to do this and to me it could seem presumptuous to assume a user wouldn't want this feature.

For others interested in doing this, since a textbox has return characters that will not work with a tooltip script, I simply string replaced the return characters with a <br \>. I did this through the display.template.php theme file. Below is the code I used.


            // Any custom fields for standard placement?
            if (!empty($message['member']['custom_fields']))
            {
                foreach ($message['member']['custom_fields'] as $custom)
                    if (empty($custom['placement']) || empty($custom['value'])) {
                        $custom['value'] = str_replace("\r\n",'<br />',$custom['value']);
                        echo '', $custom['title'], ': ', $custom['value'], '<br />';
                        }
            }


To get the textbox to show in the topic you'd need to remove the code I mentioned earlier.

Akyhne


mrhope

Quote from: Akyhne on September 25, 2010, 08:38:38 AM
Nice! How do you make the div popup?

I'm using Overlib, which is loaded in my theme as a JavaScript file. Then in the custom profile feature of SMF 2.0RC3 I'm using the below code in the enclosed section, with all above mentioned changes.

<a href="javascript:void(0);" onmouseover="return overlib('{INPUT}', STICKY, MOUSEOFF, CAPTION,'Computer Specs');" onmouseout="nd();">Specs</a>

You can see a working example of this on this thread on my board. Moving the mouse over the "Specs".


emanuele



Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Illori


Joker™

Quote from: emanuele on July 25, 2011, 05:15:43 AM
Probably this should be considered.

Quote from: Oya on September 23, 2010, 04:17:35 PM
large text is a big textbox which can contain a lot of information which would be placed every time that user was on a page

imagine you used it for like a "biographical" field for a bit about that user, user adds a paragraph, you wouldn't want that paragraph to show up multiple times a page
But emanuele the above quoted reason also seems to be pretty valid. It might be reason that the previous developers might have wrote the code that way.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

mrw1986

Would anybody be willing to help me get this implemented on my site as well? I've been trying but with no success :( I am also using it for computer specifications

Arantor

Well, it's certainly intentional that large text should normally be hidden because it would generally look terrible.

Now, we have the .smf_swaptip setup it might be feasible to re-examine this one.

shawnb61

Closing old 2.0 bugs - 2.0 is in security fixes-only at this point.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Advertisement: