News:

Wondering if this will always be free?  See why free is better.

Main Menu

Package SDK, anyone?

Started by [Unknown], November 22, 2004, 03:26:37 AM

Previous topic - Next topic

trecool999

#140
Never mind, I did it anyway.

FANCA


Joshua Dickerson

Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Daniel15

Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

Joshua Dickerson

*grumbles* How about using ENGLISH?! Even another real language would work just as well.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Shean


j soft

very nice
404?  The test_modification.php file is meant to deal directly with .mod or .xml modification files, not with whole packages.

-[Unknown]

Thanks,,
hxxp:www.jsoftj.com/ [nonactive]

geminidomino

#147
Sorry if I'm a little thick, but I don't see any tutorials or any other info...


[Edit] Nevermind... Linux Tiny-text, missed the attachment. Mea culpa. 

BiGBLiZZ

Okay genius' let figure this out...

Same problem as an earlier post... I have a huge Mod written and ready, problem:  I use JS in the code, and it in-turn uses <[CDATA[ ...code here... ]]>

As you can tell there is a problem nesting CDATA lines.

Solution?  Oh, and no, unlike the other fix in this thread I can't add the JS to an already existing JS section of the file.  Will need something else...
Think you are clever?
Prove It!

JayBachatero

What you can do is 1 user the .mod format or 2 use the chr() function and echo each char in the <![CDATA[.  Like

echo chr(60) . chr(33) . chr(91) . chr(67) . chr(68) . chr(65) . chr(85) . chr(65) . chr(91);
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

RRasco

you could just add the function to a js file.
Vehicle Management System for SMF - SMFGarage.com

Dannii

Just leave out the CDATA tags, Javascript doesn't need it as presumably you're not serving your webpages as xml.
"Never imagine yourself not to be otherwise than what it might appear to others that what you were or might have been was not otherwise than what you had been would have appeared to them to be otherwise."

BiGBLiZZ

Okay, all great suggestions.  I shall give it a go!  Thanks!
Think you are clever?
Prove It!

Something like that

NOTE!!

I wasted 4 hours until I figured this out: All the files must be in the base directory of your .tar.gz file. Do not archive the directory containing your modification files!

miseryshining

#154
Can anyone tell me how to use multiple search keys? Is the syntax any different from


<search position="before">string1</search>
<search position="after">string2</search>
<add>something to add just before string2</add>


I'd expect it to add the new part right before string2 and i expect string2 to come after string1. Am i wrong?

Another question: Can I use regular expressions to search for non-unique patterns and add replace them / add some code? I've been using the old syntax till now, and it seems some things are harder to accomplish now.

example: i want to replace all instances of
<a href="', $scripturl, '?action=unread'
with
<a href="', $scripturl, '?action=',$_REQUEST['action'].'
in the following code:

<a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=subject', $context['sort_by'] == 'subject' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[70], $context['sort_by'] == 'subject' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a>
</td><td width="14%">
<a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=starter', $context['sort_by'] == 'starter' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[109], $context['sort_by'] == 'starter' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a>
</td><td width="4%" align="center">
<a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=replies', $context['sort_by'] == 'replies' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[110], $context['sort_by'] == 'replies' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a>
</td><td width="4%" align="center">
<a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=views', $context['sort_by'] == 'views' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[301], $context['sort_by'] == 'views' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a>
</td><td width="24%">
<a href="', $scripturl, '?action=unread', $context['showing_all_topics'] ? ';all' : '', $context['querystring_board_limits'], ';sort=last_post', $context['sort_by'] == 'last_post' && $context['sort_direction'] == 'up' ? ';desc' : '', '">', $txt[111], $context['sort_by'] == 'last_post' ? ' <img src="' . $settings['images_url'] . '/sort_' . $context['sort_direction'] . '.gif" alt="" border="0" />' : '', '</a>
</td>';


that was easy with the old method, but seems almost impossible now, unless you replace the whole thing, which wouldn't be the preferred way to do it, IMO.

brianjw

Is it possible to make an uninstall package with no installs? If so, how?

Thanks,
brianjw

PS: Would something like <code type="file" reverse="true">add_settings.php</code> work? with the reverse - ive only seen it on <modification></modification> tags.

B Patterson

By nature in order to uninstall something, you have to install it... what is it you're trying to do?

Daniel15

Anyone wanting more detailed information about the XML files (package-info.xml and the modification XML files), check out http://www.smfmods.org/wiki/Category:Packages :D

QuoteIs it possible to make an uninstall package with no installs? If so, how?
How would it be uninstalled if it's not installed?

Quote
PS: Would something like

<code type="file" reverse="true">add_settings.php</code>

work? with the reverse - ive only seen it on <modification></modification> tags.
Nope, that won't work. You need your own remove_settings.php script.
Although, the SMF Coding Guidelines state that you're allowed to leave the settings in the database, just in case the user reinstalls the mod (all their settings will be preserved).
Daniel15, former Customisation team member, resigned due to lack of time. I still love everyone here :D.
Go to smfshop.com for SMFshop support, do NOT email or PM me!

brianjw

Well, this would be an uninstall only package (as in full uninstall) so if the person decides they want to remove all the database stuff too, they can but I want to do it without installing something before it. ;)

brianjw

raisara


Advertisement: