TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,250
  • Total Topics: 21,354
  • Online today: 626
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online

HELP editing custom action when adding a "New Block"

Started by teatephi, May 31, 2009, 06:17:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

teatephi

I added a new Script block to my site.
I want it to show up only when someone is posting or replying.  so I need a custom action = post, only that doesn't work.
I noticed there is more info in the address bar (topic=1721.0; num_reply=0)

What should I type in the box to get it to show for ALL posts, not just topic 1721.0.

Thanks!



Link to my site: http://www.shepherdsdisciples.com
Powered by SMF 1.1.9 | SMF Ã,© 2006-2009, Simple Machines LLC
TinyPortal v0.9.8 Ã,© Bloc
Manuscript design by Bloc Browser Name and Version: Opera 9.64
Mods installed:
Mod Name   Version   
1.   XarSmilies-1   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
2.   TinyPortal   0.983     [ Uninstall ] [ List Files ] [ Delete ]
3.   FontandSizeDropdown_1.2   1.3     [ Uninstall ] [ List Files ] [ Delete ]
4.   Simple Award System   2.0.0.4b    [ List Files ] [ Delete ]
5.   Bookmarks   1.1    [ List Files ] [ Delete ]
6.   Custom BBCode   2.00     [ Uninstall ] [ List Files ] [ Delete ]
7.   Link Thumbnail   1.0     [ Uninstall ] [ List Files ] [ Delete ]
8.   SMF Media Gallery   1.5 RC 3.2     [ Uninstall ] [ List Files ] [ Delete ]
9.   Bible - Books of Law   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
10.   Bible - Books of History   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
11.   Bible - Books of Poetry   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
12.   Bible - Books of Prophets   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
13.   Bible - New Testament   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
14.   Bible Tag   1.1     [ Uninstall ] [ List Files ] [ Delete ]
15.   ShowTopics   1.1     [ Uninstall ] [ List Files ] [ Delete ]
16.   Signature Dropdown Choices   1.0     [ Uninstall ] [ List Files ] [ Delete ]
17.   Googlebot & Spiders Mod   2.0.3    [ Apply Mod ] [ List Files ] [ Delete ]
18.   FlashChat Integration   1.0     [ Uninstall ] [ List Files ] [ Delete ]
19.   SMF 1.0.13 / 1.1.5 / 2.0 b3.1 Update   1.0    [ List Files ] [ Delete ]
20.   Attachments layout   1.3     [ Uninstall ] [ List Files ] [ Delete ]
21.   Enhanced Profile   1.1.5     [ Uninstall ] [ List Files ] [ Delete ]
22.   Profile Comments   1.4     [ Uninstall ] [ List Files ] [ Delete ]
23.   Profile User Action   1.1     [ Uninstall ] [ List Files ] [ Delete ]
24.   Googlebot & Spiders Mod   2.0.4    [ Apply Mod ] [ List Files ] [ Delete ]
25.   Auto Embed Video/Audio Clips   4.0.2     [ Uninstall ] [ List Files ] [ Delete ]
26.   Profile_Visitors   4.0     [ Uninstall ] [ List Files ] [ Delete ]
27.   Custom Profile Field Mod   3.19     [ Uninstall ] [ List Files ] [ Delete ]
28.   Bookmarks   2.2.1     [ Uninstall ] [ List Files ] [ Delete ]
29.   mp3 Flash Player BBC Tag (XHTML Compliant)   1.0     [ Uninstall ] [ List Files ] [ Delete ]
30.   Anti-Bot Registration Puzzles   1.2     [ Uninstall ] [ List Files ] [ Delete ]
31.   Are You Human? Anti-Bot Registration Check   1.3     [ Uninstall ] [ List Files ] [ Delete ]
32.   reCAPTCHA for SMF   0.9.5.3     [ Uninstall ] [ List Files ] [ Delete ]
33.   User Email System   1.3     [ Uninstall ] [ List Files ] [ Delete ]
34.   Prettier_Quotes   1.12     [ Uninstall ] [ List Files ] [ Delete ]
35.   Last Topics of Person   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
36.   SMF 1.0.16 / 1.1.8 Update   1.0     [ List Files ] [ Delete ]
37.   SMF 1.0.17 / 1.1.9 / 2.0 RC1 Update   1.0     [ Uninstall ] [ List Files ] [ Delete ]
Related Error messages:NO Error message

IchBin

Unfortunately, the post action is not working in TP 0.9.8. That has been fixed however in the TP 1.x releases. So you'll either need to upgrade, or try some custom PHP code to get it to display the way you want. Let us know what you'd like to do.

teatephi

I'd like to upgrade to 1.x,  if there's not any conflicts with SMF 1.1.9

ZarPrime

teatephi,

If you want to install the latest TP 1.0 beta 4, which is the one that you should install, then you will need to uninstall TP 0.98 first.

1.  If you have very many members, you might want to let your members know a day or so in advance that the Forum is going to be upgraded and may be offline for a couple of hours.
2.  Set your Forum to the SMF default theme
3.  Put the Forum into Maintenance Mode.
4.  Backup your Forum and database.
5.  Use the Package Manager to uninstall TP 0.98.  You have a lot of Mods so you might get errors.  If you do, then go through the manual uninstall.  Let us know if you need help doing that.
6.  Use the Package Manager to install TP 1.0 beta 4.
7.  Finally, take the Forum back out of Maintenance Mode and you should be good to go.

You'll be glad that you did the upgrade. ;)

ZarPrime

teatephi

#4
Yes I have done a lot of manual modifications. :uglystupid2:

Because of that my default theme is messed up.  It still works though, the main forum block is actually below the big blank space.
Should I worry about that? Or not and go ahead with the update?

I also read somewhere that you have to manually add the forum tab back in?  I also have a bookmarks tab and a couple others that I manually added before.  I guess I 'd have to re-add them again too?



When I re-installed an index.template file from 1.1.7  the default theme worked fine.  So no need to consider that.   

IchBin

If the mods don't show, then of course you need to add them back. :)

teatephi

#6
YEAH! I'm gonna need some instructions to uninstall manually.  I found http://www.tinyportal.net/index.php/topic,23026.0.html , but I don't think that tells me how to manually uninstall.  It said something about upgrading my SMF, and I don't have any SMF files for 1.1.9 on my computer, so I guess I can't do that step.

Any help will be much appreciated.

.   Execute Modification   ./index.php   Test successful
2.   Execute Modification   ./Sources/Load.php   Test successful

3.   Execute Modification   ./Themes/default/index.template.php   Test failed
4.   Execute Modification   ./Themes/babylon/index.template.php   File not found
5.   Execute Modification   ./Sources/Subs.php   Test successful
6.   Execute Modification   ./Sources/ManagePermissions.php   Test successful
7.   Execute Modification   ./Sources/Security.php   Test successful
8.   Execute Modification   ./Sources/Errors.php   Test successful
9.   Execute Modification   ./Themes/default/style.css   Test successful
10.   Execute Modification   ./Themes/default/Help.template.php   Test successful

11.   Execute Modification   ./Sources/Profile.php   Test failed
12.   Execute Modification   ./SSI.php   Test successful

IchBin

If you need to uninstall just follow the manual install in reverse.

Follow the Docs link at the top of the forum. :)

teatephi

#8
Ok so I'm going to edit the two failed files manually, and then I'll use the package manager to uninstall the rest.  Does that sound like a good idea? 


Also, do I have to run this file again to uninstall?
Quote
Further, you will need to run "manual_tp_install.php" (or whatever it's called) in your browser directly. That is, if you installed TP to "http://www.mysite.com/smf/" and "/public_html/smf/," you will need to put "http://www.mysite.com/smf/manual_tp_install.php" into your browser's address bar and run it. Likewise, if you installed TP to "http://www.mysite.com/" and "/public_html/," you will need to put "http://www.mysite.com/manual_tp_install.php" into your browser's address bar and run it.

My Index.template file is really different than both the mod instructions before and after edits.

For example my file says this:
// Output any remaining HTML headers. (from mods, maybe?)
echo $context['html_headers'], '

<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header = ', empty($options['collapse_header']) ? 'false' : 'true', ';

function shrinkHeader(mode)
{';

// Guests don't have theme options!!
if ($context['user']['is_guest'])
echo '
document.cookie = "upshrink=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header", mode ? 1 : 0, null, "', $context['session_id'], '");';

echo '
document.getElementById("upshrink").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

document.getElementById("upshrinkHeader").style.display = mode ? "none" : "";
document.getElementById("upshrinkHeader2").style.display = mode ? "none" : "";

current_header = mode;
}
// ]]></script>';

// the routine for the info center upshrink
echo '
<script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
var current_header_ic = ', empty($options['collapse_header_ic']) ? 'false' : 'true', ';

function shrinkHeaderIC(mode)
{';

if ($context['user']['is_guest'])
echo '
document.cookie = "upshrinkIC=" + (mode ? 1 : 0);';
else
echo '
smf_setThemeOption("collapse_header_ic", mode ? 1 : 0, null, "', $context['session_id'], '");';

echo '
document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

current_header_ic = mode;
}
// ]]></script>
</head>
<body>';


and I'm supposed to delete this:

  <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
                var current_leftbar = ', empty($options['collapse_leftbar']) ? 'false' : 'true', ';

                function shrinkHeaderLeftbar(mode)
                {';

        // Guests don't have theme options!!
        if ($context['user']['is_guest'])
                echo '
                        document.cookie = "upshrink=" + (mode ? 1 : 0);';
        else
                echo '
                        smf_setThemeOption("collapse_leftbar", mode ? 1 : 0, null, "', $context['session_id'], '");';
        echo '
                        document.getElementById("upshrinkLeftbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

                        document.getElementById("leftbarHeader").style.display = mode ? "none" : "";

                        current_leftbar = mode;
                }
          // ]]></script>
       <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
                var current_rightbar = ', empty($options['collapse_rightbar']) ? 'false' : 'true', ';

                function shrinkHeaderRightbar(mode)
                {';

        // Guests don't have theme options!!
        if ($context['user']['is_guest'])
                echo '
                        document.cookie = "upshrink=" + (mode ? 1 : 0);';
        else
                echo '
                        smf_setThemeOption("collapse_rightbar", mode ? 1 : 0, null, "', $context['session_id'], '");';

        echo '
                        document.getElementById("upshrinkRightbar").src = smf_images_url + (mode ? "/upshrink2.gif" : "/upshrink.gif");

                        document.getElementById("rightbarHeader").style.display = mode ? "none" : "";

                        current_rightbar = mode;
                }
        // ]]></script>


My file has this whole "routine for center upshrink" different from the one I'm supposed to delete.  Shall I delete it?


THE REST OF THE EDITS ARE SIMPLY NOT IN THE FILE.  This is probably because I replaced this file with 1.1.7's upgrade package.

Whew I'm surprised TP worked at all!

The Profile.php file I uninstalled manually without a hitch, ready to upload that one.

Thanks for all your Genius Help!

IchBin

You can leave the javascript in there. That code is usually in every SMF theme unless its been altered by the theme author.

This website is proudly hosted on Crocweb Cloud Website Hosting.