Jump to content

Open Coterie  ·  19 members

SMF Staff People

Character Mod


Jones
 Share

Recommended Posts

Woohoo don't flip any tables, that did exactly what I needed it to! I also had to put it for the 'started by' bit. Just changed ['last_post'] to ['first_post'] (putting that there in case anyone experiences similar).

 

I have not had luck with getting the thread description to show on the message index but I'll keep trying. 

 

You are a great coder, by the way, we can all tell because you are so willing to sit here and help us figure out what's going on. Let me know if you have any ideas about fixing the post count issue part. It's not that important since its letting me post and everything is displaying correctly now. Sorry it's been such an ordeal getting it to work right for us. lol. I will still happily slap v3 on this bad boy when it comes out. Definitely the most useful SMF mod for rpers! 

 

P.S. I am fresh out of vodka but I do have malibu and half a gallon of orange juice. 🙃

Edited by Jones
  • Preach it! 1

 

operation: bowtruckles & bombs

R6MmD.png

Link to comment
Share on other sites

Right, yeah, I don't use the topic starter bit on message index so I forgot that exists. xD

 

The post count thing may be fixed now that it's presumably not docking too much, but I had a tiny problem with it docking post count when editing a post even though the poster didn't change, so, actually, if you could watch the counts for me and lemme know if it does still take away user post numbers when editing a character post and not changing the poster, that'd be coolish. That should be fixed but at this point I'm just going to assume it's gonna break in every possible way even when I did fix it. xD

Awh hallowed son of Mary it actually developed a new problem on me. Neeever mind. I think I found what screwed you over so bad. ... I'm having a hard time caring gbh lol I may just ignore it and let ACM3 fix it.

 

To be totally honest with you, I actually have no idea if it'll be possible to go straight from ACM2 to ACM3, because the core file system edits will be different, as will a good bit of the database, so upgrading it will be a bit more involved. Most likely will have to uninstall ACM2, rip out all the ACM2 stuff the uninstaller doesn't get out and then install 3. Basically it's just a big code cleanup and streamline, with some minor functionality improvements, I don't think it'll bring anything really sparkly to the table lol But apparently I have a load of bugs to fix... this is my life y'all. 99 lil bugs in the code, 99 lil bugs... take one down, patch it around JESUS THAT'S A LOTTA BUGS IN THE CODE.

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

*makes that drink a double shot* You have earned it my friend.

 

I am not afraid to make back-ups, roll up my sleeves and muck through code I can barely read. Obviously. 😅 So whatever AMC3 takes to plug in I'll do. That's pretty much been my entire experience with SMF. Break the stuff, touch the shinies, cry when it doesn't work, cry even harder when it does. I could not even imagine trying to code up a mod for it. I coded a caste generator for WL and almost gave up on life and that was just some baby javascript. But the person that made the theme before I edited it used really generic class names so I am constantly breaking stuff on that theme. lol. 

 

Anyway. I think that is pretty much all of my fires put out. I will keep slapping these thread descriptions around until they treat me right. Hopefully you can take a break from me now. 😁

 

operation: bowtruckles & bombs

R6MmD.png

Link to comment
Share on other sites

Quick question: Does this code block from messageindex.php seem right? I had a topic description mod when I first started working on this theme, then I uninstalled it when I installed the char mod and realized it had one built in. I still can't get the topic descriptions to show up on messageindex.template.php. Should it have 'description' twice like that? This is from inside the $context['topics'][$row['id_topic']]  array.

 

	'description' => !empty($row['topic_description']) ? $row['topic_description'] : '',
	'date' => array(
		'month' => !empty($row['date_month']) ? $txt['months'][$row['date_month']] : 0,
		'day' => !empty($row['date_day']) ? $row['date_day'] : 0,
		'year' => !empty($row['date_year']) ? $row['date_year'] : 0,
		),
	'description' => $row['description'],
	);

 

 

operation: bowtruckles & bombs

R6MmD.png

Link to comment
Share on other sites

The second one is for the other mod, and because it comes after the one for ACM2, it's overriding the one for ACM2, so go ahead and take that one out. Maaaybe magic will happen? Lol

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

😔 Of course it would not be that easy. Thanks anyway.

 

operation: bowtruckles & bombs

R6MmD.png

Link to comment
Share on other sites

Aww :/ Well, when I wake up I'll have a look at mine and see if I can narrow down what it's not doing and why not. Tbh it sounds like it's not saving the description in the first place, so I'll probably start there.

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

Thanks friend. I hope you get some good rest in. 

 

operation: bowtruckles & bombs

R6MmD.png

Link to comment
Share on other sites

Actually, nm, scratch that, I'm a bloody idiot, yours shows in thread view display, bloody display, fawk, right?

Find this:

	// Grab the appropriate topic information...
	if (!$pre_query || !empty($topic_ids))
	{
		// For search engine effectiveness we'll link guests differently.
		$context['pageindex_multiplier'] = empty($modSettings['disableCustomPerPage']) && !empty($options['messages_per_page']) && !WIRELESS ? $options['messages_per_page'] : $modSettings['defaultMaxMessages'];

		$result = $smcFunc['db_query']('substring', '
			SELECT

in MessageIndex.php. In that SELECT, after t.unapproved_posts is fine, add t.topic_description, (don't forget the comma)

now try.

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

😍  Ayyyyyy you rock. Working great now. Thank you.

 

operation: bowtruckles & bombs

R6MmD.png

Link to comment
Share on other sites

Woohoo thank God, going to bed now rofl yall enjoy your new shiny xD

  • Thank you 1

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

Sleep well, you've definitely earned it. 😉

 

One more thing I noticed but fixed myself: the topic descriptions were not showing back up when I would modify a post so I was losing them on edit. 

 

In Sources/Post.php this bit needs 't.topic_description,' added in after the select. I put it right behind 'm.subject,' and it is working fine now. So if anyone else has that issue, the fix is quick and very easy.

	// Get the existing message.
		$request = $smcFunc['db_query']('', '
			SELECT
				m.id_member, m.modified_time, m.smileys_enabled, m.body,
				m.poster_name, m.poster_email, m.subject, m.icon, m.approved,
				IFNULL(a.size, -1) AS filesize, a.filename, a.id_attach,
				a.approved AS attachment_approved, t.id_member_started AS id_member_poster,
				m.poster_time
			FROM {db_prefix}messages AS m
				INNER JOIN {db_prefix}topics AS t ON (t.id_topic = {int:current_topic})
				LEFT JOIN {db_prefix}attachments AS a ON (a.id_msg = m.id_msg AND a.attachment_type = {int:attachment_type})
			WHERE m.id_msg = {int:id_msg}
				AND m.id_topic = {int:current_topic}',
			array(
				'current_topic' => $topic,
				'attachment_type' => 0,
				'id_msg' => $_REQUEST['msg'],
			)
		);

 

 

operation: bowtruckles & bombs

R6MmD.png

Link to comment
Share on other sites

Aight, figured out the post count issue:

Pop open Post.php, find this:

	// Editing a message...
	elseif (isset($_REQUEST['msg']) && !empty($topic))
	{
		$_REQUEST['msg'] = (int) $_REQUEST['msg'];

		// Get the existing message.

There's a SELECT right under that, add m.id_character somewhere; don't forget the comma ofc.

 

What this does is logs the post's existing character ID to the $context array, which the code then checks against the selected character ID. So since that wasn't loading, basically every time you edited a post made by a character, the system thought it was a new post by that character and docked a post count number off user and moved it to character. Eventually it docked so many that the user account no longer had any posts at all. (This is why the original coding for the post count dock didn't have a check for it being at 0 because it should never normally hit 0.)

 

And that should fixy up that.

  • Like 1

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

Ok, so I added that. When I post a reply with my ooc it still doesn't up the post count. If I edit a message made by the character account it ups the ooc post count though. Lol. And I suddenly have an issue where when I modify or make a new post it kicks me back to the message index instead of showing me the post I just posted. I don't think its related to this, but I have no idea why it is happening. 

 

operation: bowtruckles & bombs

R6MmD.png

Link to comment
Share on other sites

Did you check to make sure post count is on in the board settings? Cause that's the only other thing I can think, is not doing that with me, so, not honestly sure where to start with TSing that one.

nusignature.png nusignature.png

I am the darkness, always watching, always listening, ALWAYS THERE.
(If you're interested in Plain of Ice, message me, it's private. Bleach site, non-canon.)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use, Guidelines and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.