Levertine

Please login or register.

Recent Posts

Pages: 1 ... 8 9 [10]
91
Questions and Discussion / Connecting LevGal to SMFHacks Badge Awards
« Last post by testing123 on April 04, 2015, 12:34:51 PM »
The title is pretty self explanatory but wondered if anyone else happens to be using 'SMFHacks Badge Awards' Mod, as well as LevGal?

I've found the basics of what I think would need to be done to have the badges awarded but putting the relevant parts together is where I get stuck..



Quote from: SMFHacks.com Team
Custom Badge Action Guides

It is easy to expand Badge Awards. To create a custom badge. Click on the Add Badge link inside the Badge Awards admin.
On that page the main requirement is a unique action name. You will use this action name in your call to badgeawards to add a badge to a member if you are using it dynamically.


The Badges_AwardBadge takes a couple different parameters only the memberid and actionname are required Badges_AwardBadge($memberID,$actionname,$sendpm)

Example code below for custom actions

Code: [Select]
// Badge Awards
global $sourcedir, $user_info;
require_once($sourcedir . '/badgeawards2.php');
Badges_AwardBadge($user_info['id'],'customactionname');
Badges_CheckMember($user_info['id']);
// End Badge Awards


However, the badge awards mod already has 2 pre-installed badges, that I think could be tweaked to work with LevGal..

I think the below codes are connected to SMFHacks Gallery:

The first badge is awarded when a user adds an item to the gallery, and the second when they have 10+ items.

Code: [Select]
if (isset($modSettings['gallery_set_images_per_page']))
{

$result2 = $smcFunc['db_query']('', "
SELECT COUNT(*) AS total FROM {db_prefix}gallery_pic
WHERE ID_MEMBER = $memberID");
$totalRow = $smcFunc['db_fetch_assoc']($result2);


$badgeAction = 'gallery';
if (!in_array($badgeAction,$currentBadges) && $totalRow['total'] >= 1)
{
$badgeID = GetBadgeIDByAction($badgeAction);
$ret = AddBadgeToMember($memberID,$badgeID,false);
if ($ret == true)
{
$currentBadges[] = $badgeAction;
$newBadges[]  = $badgeAction;
}

}
// photographer
$badgeAction = 'photographer';
if (!in_array($badgeAction,$currentBadges) && $totalRow['total'] >= 10)
{
$badgeID = GetBadgeIDByAction($badgeAction);
$ret = AddBadgeToMember($memberID,$badgeID,false);
if ($ret == true)
{
$currentBadges[] = $badgeAction;
$newBadges[]  = $badgeAction;
}

}


}


I'd like to make the most out of the badge awards mod and tying it in with the gallery would be sweet!
(possibly another idea for a hook in the future of LevGal, if theres enough interest? :) )

Unlimited Coffee, Tea and Cake provided :P
 O:-)  :tea:
92
Questions and Discussion / Re: Purchased but can't download
« Last post by Josh on April 04, 2015, 12:38:13 AM »
Sorry about that and thank you :)

I will have to get onto PayPal as to what's up with their IPN being useless. Meanwhile hopefully I will be able to spend some of the long weekend looking into issues for LevGal because having 4 days off to recover from the day job rather than 2 means this could be a thing :)

Would it be possible for you to add a scroll bar to the simple portal block? If you don't want to no problem I'll find someone else who can.

I have 5 columns and I'd like to have one or two displayed with a scroll bar so that I could have like 5-6 rows. Thanks if you consider.
93
Questions and Discussion / Re: Purchased but can't download
« Last post by GrizzyGray on April 03, 2015, 09:35:46 PM »
Amazing mod man. Thanks. Would be cool to see some new additions too if possible ;)
94
General Discussion / Re: Just Curious
« Last post by GrizzyGray on April 03, 2015, 09:28:06 PM »
Thanks for the link. Looks good.
95
General Discussion / Re: Just Curious
« Last post by Arantor on April 03, 2015, 08:56:35 PM »
This smiley set is culled from http://www.fatcow.com/free-icons
96
Questions and Discussion / Re: Another one.. or two..
« Last post by Arantor on April 03, 2015, 08:55:31 PM »
The mod works completely on 2.1 as far as I know ;)

Yes, LevGal does not perform any find/replace changes on any SMF file whatsoever, it is totally separate and performs a lot of magic to integrate cleanly with SMF and possibly at least one of the forks.

To replace the attachments system is kinda doable without file edits but fragility would be a thing.
97
Questions and Discussion / Re: Could anyone share...
« Last post by Arantor on April 03, 2015, 08:54:05 PM »
Doesn't paginate but unless you have a seriously massive forum with many many people having their own albums (which, incidentally, is not what seems to happen in practice), it's usually not a huge deal, but this is also why the sidebar has filtering options.

Worst case scenario in that situation would be consolidation into group albums.
98
Questions and Discussion / Re: How long LevGal will exist?
« Last post by Arantor on April 03, 2015, 08:52:32 PM »
$50k is about market average for PHP. I could get more working in London but frankly that would require me to spend even more time commuting with a less pleasant commute than I have now... at least I get seats on the trains in the morning.
99
Questions and Discussion / Re: Purchased but can't download
« Last post by Arantor on April 03, 2015, 08:51:46 PM »
Sorry about that and thank you :)

I will have to get onto PayPal as to what's up with their IPN being useless. Meanwhile hopefully I will be able to spend some of the long weekend looking into issues for LevGal because having 4 days off to recover from the day job rather than 2 means this could be a thing :)
100
General Discussion / Just Curious
« Last post by GrizzyGray on April 02, 2015, 08:40:03 PM »
What smiley set does this website use? I have seen it on a few other forums and it looks nice.  :tea:
Pages: 1 ... 8 9 [10]
SMF 2.0.9 | SMF © 2014, Simple Machines
BlueLight design by Bloc