A code for showing if the page is popup or postform on the posting page

Started by Yağız..., November 30, 2009, 12:36:35 PM

Previous topic - Next topic

Yağız...

I changed this code:
                    sSmileyTemplate: ', JavaScriptEscape('
                        <img src="%smileySource%" align="bottom" alt="%smileyDescription%" title="%smileyDescription%" id="%smileyId%" />
                    '), ',

With this one:
                if ($context['smileys']['popup'])
                    echo '
                    sSmileyTemplate: ', JavaScriptEscape('
                        <tr valign="top"><td class="windowbg"><img src="%smileySource%" align="bottom" alt="%smileyDescription%" title="%smileyDescription%" id="%smileyId%" /></td><td class="windowbg">%smileyCode%</td></tr>
                    '), ',';
                else
                    echo '
                    sSmileyTemplate: ', JavaScriptEscape('
                        <img src="%smileySource%" align="bottom" alt="%smileyDescription%" title="%smileyDescription%" id="%smileyId%" />
                    '), ',';

for showing the location of the page, but it doesn't work :/ Any help please?

karlbenson

The popup is created entirely in javascript.
No php variable is set.

editor.js @ line 1475

Yağız...

Hmm, thanks for the reply but I don't need the code which opens the popup. I need this:
if $context['smileys'] is popup
echo the code who will show if the page is popup
else
echo the code who will show if the page is not popup(postform)

I tried this:
                if ($context['smileys']['popup'])
                    echo '
                    sSmileyTemplate: ', JavaScriptEscape('
                        <tr valign="top"><td class="windowbg"><img src="%smileySource%" align="bottom" alt="%smileyDescription%" title="%smileyDescription%" id="%smileyId%" /></td><td class="windowbg">%smileyCode%</td></tr>
                    '), ',';
                else
                    echo '
                    sSmileyTemplate: ', JavaScriptEscape('
                        <img src="%smileySource%" align="bottom" alt="%smileyDescription%" title="%smileyDescription%" id="%smileyId%" />
                    '), ',';

But it changes the two pages, popup and postform ...


karlbenson

The need doesn't just open the popup, it writes all the content inside it using JAVASCRIPT.
The popups do not request a page from your forum.  Its all done clientside.

Advertisement: