Uridium Posted Monday at 07:44 PM Share Posted Monday at 07:44 PM this mod will allow you to add images to your inventory items.. Let me get my edits together and i'll post the script just 2 files to edit and an sql insert for the item names goto your phpmyadmin go to your table and click on SQL and add this ALTER TABLE inventory ADD pic varchar(255); then open modules/installed/inevntory/hooks/meta.php and add new Hook("itemMetaData", function () { global $db; return array( "id" => "pic", "sort" => 11, "width" => 12, "label" => "Item Image (usually modules/installed/inventory/images/NAME OF IMAGE.jpg", "type" => "textarea", "rows" => 1, "validate" => function ($value) { return true; } ); }); now open up modules/installed/inevntory/inventory.tpl.php and find on mine its line 26-27 <div class="panel-heading"> Information </div> underneath add <div class="panel-body"> <center><img src="{pic}"></center> </div> and your done 2 Quote Link to comment Share on other sites More sharing options...
Uridium Posted Thursday at 01:12 AM Author Share Posted Thursday at 01:12 AM 2 days and no replies ???? years ago i would have had 50 - 90 replies ? Is it time to give up ? Quote Link to comment Share on other sites More sharing options...
URBANZ Posted Thursday at 08:57 AM Share Posted Thursday at 08:57 AM nice addition but i would say there is no need to touch the database, you can just use the item id as the image name instead of adding data that isn't needed. Quote Link to comment Share on other sites More sharing options...
tom39 Posted Thursday at 10:17 AM Share Posted Thursday at 10:17 AM nice work it's looking good Quote Link to comment Share on other sites More sharing options...
Uridium Posted Thursday at 11:27 PM Author Share Posted Thursday at 11:27 PM 14 hours ago, URBANZ said: nice addition but i would say there is no need to touch the database, you can just use the item id as the image name instead of adding data that isn't needed. ah wasnt aware of that im still in MCCODES mine frame Thank ya Urb.. 2 Quote Link to comment Share on other sites More sharing options...
gamble Posted yesterday at 12:16 AM Share Posted yesterday at 12:16 AM I wouldn't say what you did was wrong by any means. I think this comes down to do you want a clean tidy database, or do you want easily maintainable files. Personally I like your way due to the maintainability of the files...I know what hammer.png is every time, not always was 42.png is. You could always find the middle ground and have null as a default representing {ID}.png or if there's a value you can pull that image instead. Best of both worlds Quote Link to comment Share on other sites More sharing options...
Veramys Posted yesterday at 03:29 AM Share Posted yesterday at 03:29 AM On 1/25/2023 at 8:12 PM, Uridium said: 2 days and no replies ???? years ago i would have had 50 - 90 replies ? Is it time to give up ? Are you seeking validation? Replies come in their own time, and this forum definitely isn't as active as it once was. If that's all it takes for you to give up that's on you. Quote Link to comment Share on other sites More sharing options...
newttster Posted 21 hours ago Share Posted 21 hours ago 8 hours ago, Veramys said: Are you seeking validation? Replies come in their own time, and this forum definitely isn't as active as it once was. If that's all it takes for you to give up that's on you. Good grief. Did you put on your asshole hat today? It didn't seem to me that he was looking for validation. Lots of the older members of this site do not necessarily know it's open again, under new management. And the ones that do, are doing as they've always done; submitting content ... for free, I might add. Given how active the site used to be, it's not surprising that some will wonder if it's worth posting content or not, given how few visit here anymore. That is no ones fault, by any means. And I can certainly understand why someone would question if it's worth posting any helpers or not. And yes ... I put on my asshole hat. There was a nicer way you could have said what you did ... or better yet, since it didn't help or contribute to his helper module you could have just said nothing at all. And, again, yes ... I understand the irony of my own post. 2 Quote Link to comment Share on other sites More sharing options...
Uridium Posted 6 hours ago Author Share Posted 6 hours ago 23 hours ago, Veramys said: Are you seeking validation? Replies come in their own time, and this forum definitely isn't as active as it once was. If that's all it takes for you to give up that's on you. Id never give up I was however saying back in the days when MWG was Criminal Existence as soon as youd post there were about 10 replies within the hour.. Just miss all the people that were here from them days.. Quote Link to comment Share on other sites More sharing options...
Veramys Posted 1 hour ago Share Posted 1 hour ago I apologize, I didn't mean it to come off as mean as I did, and that was rude of me. I also miss the community being active like it was back in the day. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.