Author Topic: SMFShop Inventory Post Modification  (Read 99121 times)

Offline sixu

Re: SMFShop Inventory Post Modification
« Reply #45 on: October 19, 2007, 07:17:41 am »
Went through all the files and deleted, maybe three stray lines of SMF shop code. Reinstalled, then applied the inventory  mod.

Works like a bloody charm! Well done.

Do you think in the future, the sig inventory will have one of those minimise/maximise buttons? because that would look amazing!

Offline Zenin

Re: SMFShop Inventory Post Modification
« Reply #46 on: October 19, 2007, 09:05:56 am »
oh sorry yeh i fogot to mention i did a kinda work around so that i could install mods more easily i droped the custom theme into the default one, so that official mods could be installed on custom theme in the default directory. there is no default theme to switch to becuase thats the custom one now :-\

but like i said the display.template file did respond as a successfull install, the only file that failed was index.template, i tried to edit that afterwards but could not find the code.(as its a a custom theme)

does the border on post area have anything to do with index.template?

could you tell me what possible edits i can make to the display.template in order to show the border. (ive spent ages searching install.xml with no luck :()

thanks again for any help given.

Offline sixu

Re: SMFShop Inventory Post Modification
« Reply #47 on: October 19, 2007, 11:12:37 am »
isn't it just in "display.template"?

in or near "==Show signature?=="

it looks like a HTML table <td></tr> etc...

Offline Zenin

Re: SMFShop Inventory Post Modification
« Reply #48 on: October 21, 2007, 02:27:15 am »
isn't it just in "display.template"?

in or near "==Show signature?=="

it looks like a HTML table <td></tr> etc...

hmm ill have a look at it again, but if the install.xml file didnt input anything like <td></tr> then why would it be there...i will look more into this.
inkstains do you have any other ideas, or know what the code should look like.

can one of you show me the code from your working display.template, so i can find out why the border is missing from mine.

Offline inkstains

Re: SMFShop Inventory Post Modification
« Reply #49 on: October 21, 2007, 10:10:19 am »
Went through all the files and deleted, maybe three stray lines of SMF shop code. Reinstalled, then applied the inventory  mod.

Works like a bloody charm! Well done.

Do you think in the future, the sig inventory will have one of those minimise/maximise buttons? because that would look amazing!

glad to hear it's working properly as for minimize maximize i don't think so unless i removed the fieldset and did it a different way.




oh sorry yeh i fogot to mention i did a kinda work around so that i could install mods more easily i droped the custom theme into the default one, so that official mods could be installed on custom theme in the default directory. there is no default theme to switch to becuase thats the custom one now :-\

but like i said the display.template file did respond as a successfull install, the only file that failed was index.template, i tried to edit that afterwards but could not find the code.(as its a a custom theme)

does the border on post area have anything to do with index.template?

could you tell me what possible edits i can make to the display.template in order to show the border. (ive spent ages searching install.xml with no luck :()

thanks again for any help given.

very confusing.

your Display.template.php file is correct that isn't your problem.

you need to fix that error that you had on the index.template.php file to begin with (though that may not be your whole problem) you say you can't find the index.template.php file

on an ordinary install the index.template.php file edited is in the default themes folder and if you wanted to do it for a custom you would locate the index.template.php file in that themes folder. seeing as your install seems a little screwy and i don't fully understand what you've done but from what i can decipher is you've copied the files from your custom themes folder and pasted them into the default themes folder overwriting all duplicate files (not a good idea imo) so you'll locate it in the default themes folder if so.

the edits you need to do to the index.template.php file are as follows


Find:

Code: [Select]
if (in_array($context['current_action'], array('shop_general', 'shop_items_add', 'shop_items_edit', 'shop_cat', 'shop_inventory', 'shop_restock', 'shop_usergroup')))
Replace with:
 
Code: [Select]
if (in_array($context['current_action'], array('shop_general', 'shop_items_add', 'shop_items_edit', 'shop_cat', 'shop_inventory', 'shop_restock', 'shop_usergroup', 'shop_IPM')))
if fixing index.template.php doesn't work....

you say you've replaced the default theme?? i don't understand. if you go into your boards admin and go

Configuration>Themes and Layout

can you see SMF Default Theme - core??

if so can you set your forum to that and see if the IPM works correctly then post here again.
« Last Edit: October 21, 2007, 10:17:57 am by inkstains »

Offline Zenin

Re: SMFShop Inventory Post Modification
« Reply #50 on: October 21, 2007, 10:31:54 am »
yeh i know ive kinda done the things i shudnt have done. thats exactly it ive made pasted my custom theme into my defualt theme directory, purposfully so that any mod i install would work, as it installs to the default theme.

also in index.template the code below doesnt exist anywhere. i think i can figure out this by looking at a original index.template and using my own custom one.
Code: [Select]
if (in_array($context['current_action'], array('shop_general', 'shop_items_add', 'shop_items_edit', 'shop_cat', 'shop_inventory', 'shop_restock', 'shop_usergroup')))
ill get back to you once ive modified the index.template correctly. and tell you if that fixes the border issue.

thanks for the help mate.

Offline inkstains

Re: SMFShop Inventory Post Modification
« Reply #51 on: October 21, 2007, 10:38:02 am »
you won't be able to find that exact line mentioned in the Find part if you could it would have made the modification to that file successfully.  :)  you'll need to look for a slightly different version of it. try searching for maybe the first half of the Find part or post your file up here and i'll do it for you. let me know how ya go.

Offline Zenin

Re: SMFShop Inventory Post Modification
« Reply #52 on: October 22, 2007, 11:20:03 pm »
ok ive successfully edited the index.template, and the border is still missing.  :tickedoff:

i am now thinking it must be the tables not coded properly or the css for the 1px border doesnt not exist for my theme.
the problem must lie in display template.

there must be an edit i can make to this section of the code, im still a begginner at PHP but i think the fix can be made somewhere here.
inkstains can you give me any guidance as what to edit to show border.

thanks for all the help.

Code: [Select]
// Show the member's gender icon?
if (!empty($settings['show_gender']) && $message['member']['gender']['image'] != '')
echo '
', $txt[231], ': ', $message['member']['gender']['image'], '<br />';

// Show how many posts they have made.
// echo '
// ', $txt[26], ': ', $message['member']['posts'], '<br />
// <br />';

//BEGIN SMFShop Code IP EDIT
if ($modSettings['ShopIpDis'] == 0)
{
// BEGIN SMFShop MOD New Version Code
// Removed one <br /> from end of post count line.
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />
';

echo '
<br>', $modSettings['shopCurrencyPrefix'], $message['member']['money'], $modSettings['shopCurrencySuffix'], '<br /> <a href="', $scripturl, '?action=shop;do=invother2;member=', $message['member']['username'], '">View Inventory</a><br />
<a href="', $scripturl, '?action=shop;do=sendmoney;member=', $message['member']['username'], '">Send Money to ', $message['member']['name'], '</a><br />';
//END SMFShop code
}
else{
// BEGIN SMFShop MOD New Version Code
// Removed one <br /> from end of post count line.
echo '
', $txt[26], ': ', $message['member']['posts'], '<br />
';

echo '
<br>', $modSettings['shopCurrencyPrefix'], $message['member']['money'], $modSettings['shopCurrencySuffix'], '<br />
<a href="', $scripturl, '?action=shop;do=sendmoney;member=', $message['member']['username'], '">Send Money to ', $message['member']['name'], '</a><br />';
//END SMFShop code
}
//END SMFShop Code IP EDIT

//BEGIN SMFShop IPM
//Check if postbit is the chosen display section or if IPM is even turned on
if ($modSettings['ShopIpDis'] == 1 && $modSettings['ShopIpPos'] == 0)
{
//Check there actually are items in the array
if (count($message['member']['shopitems']) != 0)
{
//Set up the fieldset with legend link to members inventory
echo '<fieldset><legend><a href="', $scripturl, '?action=shop;do=invother2;member=', $message['member']['username'], '">View Entire Inventory</a></legend>';
//Loop through all the items and output
foreach ($message['member']['shopitems'] as $shopitem)
{
echo "<img src='{$boardurl}/Sources/shop/item_images/{$shopitem['image']}'title='{$shopitem['desc']}'>&nbsp;&nbsp;";
}
echo '</fieldset>';
}
}
//END SMFShop IPM

// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
echo '
<div style="overflow: auto; width: 100%;">', $message['member']['avatar']['image'], '</div><br />';

// Show their personal text?
if (!empty($settings['show_blurb']) && $message['member']['blurb'] != '')
echo '
', $message['member']['blurb'], '<br />
<br />';

Offline inkstains

Re: SMFShop Inventory Post Modification
« Reply #53 on: October 23, 2007, 09:52:07 am »
your Display.template.php file is fine for a standard setup but your setup is a little non-standard  :D

this may or may not work but make a backup of your Display.template.php file then use the attached in it's place

« Last Edit: October 23, 2007, 01:44:18 pm by inkstains »

Offline Zenin

Re: SMFShop Inventory Post Modification
« Reply #54 on: October 24, 2007, 02:20:24 am »
nope no change it didnt work :(

EDIT: ok i did it another way using css, and omg the result is amazing i totally change the rest of the post area and it looks soo much better!
heres a screenshot

« Last Edit: October 24, 2007, 03:06:33 am by Zenin »

Offline Zenin

Re: SMFShop Inventory Post Modification
« Reply #55 on: October 24, 2007, 03:08:19 am »
thanks for all the help inkstains and sixu.

 O0  :D  :smitten:

Offline mommyadmin

Re: SMFShop Inventory Post Modification
« Reply #56 on: October 30, 2007, 08:25:44 am »
Ok... I deleted the original shop. Reinstalled 3.0 and tried to add the upgrade and I got this.

I'm running 1.1.4

Installations actions for "SMFShop 2.3 to 3.0 Update":
Installing this package will perform the following actions:
   Type    Action    Description
1.    Extract File    ./Sources/shop/dointerest.php    
2.    Extract File    ./Sources/shop/item_engine.php    
3.    Extract File    ./Sources/shop/Shop.php    
4.    Extract File    ./Sources/shop/ShopAdmin.php    
5.    Extract File    ./Sources/shop/Shop-Bank.php    
6.    Extract File    ./Sources/shop/Shop-Buy.php    
7.    Extract File    ./Sources/shop/Shop-Inventory.php    
8.    Extract File    ./Sources/shop/Shop-Send.php    
9.    Extract File    ./Sources/shop/Shop-Subs.php    
10.    Extract File    ./Sources/shop/Shop-Trade.php    
11.    Extract File    ./Sources/shop/shopVersion.php    
12.    Extract File    ./Sources/shop/items/AddToPostCount.php    
13.    Extract File    ./Sources/shop/items/ChangeDisplayName.php    
14.    Extract File    ./Sources/shop/items/ChangeOtherTitle.php    
15.    Extract File    ./Sources/shop/items/ChangeUsername.php    
16.    Extract File    ./Sources/shop/items/ChangeUserTitle.php    
17.    Extract File    ./Sources/shop/items/DecreasePost.php    
18.    Extract File    ./Sources/shop/items/DisplayMessage.php    
19.    Extract File    ./Sources/shop/items/EmailAdmin.php    
20.    Extract File    ./Sources/shop/items/filedownload.php    
21.    Extract File    ./Sources/shop/items/IncreaseKarma.php    
22.    Extract File    ./Sources/shop/items/IncreaseTimeLoggedIn.php    
23.    Extract File    ./Sources/shop/items/PrimaryMemberGroup.php    
24.    Extract File    ./Sources/shop/items/RandomMoney.php    
25.    Extract File    ./Sources/shop/items/Rock.php    
26.    Extract File    ./Sources/shop/items/Steal.php    
27.    Extract File    ./Sources/shop/items/StickyTopic.php    
28.    Extract File    ./Sources/shop/items/testitem.php    
29.    Extract File    ./Sources/shop/items/testitem2.php    
30.    Extract File    ./Themes/default/languages/Shop.english.php    
31.    Extract File    ./Themes/default/ShopAdmin.template.php    
32.    Extract File    ./Themes/default/Shop.template.php    
33.    Execute Modification    ./index.php    Test failed
34.    Execute Modification    ./Sources/Post.php    Test failed
35.    Execute Modification    ./Sources/Subs.php    Test failed
36.    Execute Modification    ./Themes/default/Display.template.php    Test failed
37.    Execute Modification    ./Themes/default/index.template.php    Test failed

38.    Execute Modification    ./Sources/Load.php    Test successful
39.    Execute Modification    ./Sources/ManagePermissions.php    Test successful
40.    Execute Modification    ./Themes/default/Profile.template.php    Test successful
41.    Execute Modification    ./Themes/default/languages/Errors.english.php    Test successful
42.    Execute Modification    ./Themes/default/languages/ManagePermissions.english.php    Test successful
43.    Execute Code    updateScript.php

Offline inkstains

Re: SMFShop Inventory Post Modification
« Reply #57 on: October 30, 2007, 09:20:01 am »
http://www.daniel15.com/forum/index.php/board,16.0.html

is the section for SMFShop install questions

the basic resons for the fail is it can't find the section it needs to edit or the edits have already been done. you should put the SMFShop package through the package parser

http://modparser.dev.dansoftaustralia.net/

and follow the instructions to make the required edits.
« Last Edit: October 30, 2007, 09:23:58 am by inkstains »

Offline cponygo

Re: SMFShop Inventory Post Modification
« Reply #58 on: December 18, 2007, 11:42:12 am »
okay- hey all..been looking for something like this and looks great but I am having a issue that is simular...clean install on Shop3.0 as well as a Package install of the IPM and have the IPM listed in my shop admin but when I click it it takes me back to the homepage as it did for a previous member but my installs are clean without mods or default overlay custom themes. I did check the IPM in the default setting and it worked the same-as in took me to the front page. I Parsed it with Daniels Parser and manually checked to see all the code was in place....was a lot on the eyes...lol

any ideas??

thanks much -Andy

Offline zodiac

Re: SMFShop Inventory Post Modification
« Reply #59 on: December 20, 2007, 04:56:49 pm »
i ill try it