Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace shorten_subject #503

Merged
merged 9 commits into from Jun 8, 2013
Merged

Replace shorten_subject #503

merged 9 commits into from Jun 8, 2013

Conversation

Spuds
Copy link
Contributor

@Spuds Spuds commented Jun 7, 2013

PBE added a shorten_text function, this PR combines the two and updates the calls.

@eurich requested this a bit ago, I think this is what was needed. We can add additional "smarts" to shorten_text if wanted.

… place.

! Minor changes to shorten_text to make it backward compatable with shorten_subject

Signed-off-by: Spuds <spuds@spudsdesign.com>
@eurich
Copy link
Member

eurich commented Jun 8, 2013

👍 yeah, totally forgot my old PR.. was outdated and deleted, anyway..
would be nice if you could add a feature:

shorten_text($row['subject'], $modSettings['subject_length']),

IIRC I added four hidden settings in my old PR.
$modSettings['subject_length']
$modSettings['ssi_subject_length']
$modSettings['ssi_body_length'](for the preview one line below shorten_text%28%29)

I don't remember the fourth, but it was a hardcoded param related the shortened preview on board index or MessageIndex..

@Spuds
Copy link
Contributor Author

Spuds commented Jun 8, 2013

Makes sense to be a bit less hard coded ... so generally update them like:
shorten_text($row['subject'], !empty($modSettings['subject_length']) ? $modSettings['subject_length'] : 24);

Spuds added 5 commits June 8, 2013 08:46
Signed-off-by: Spuds <spuds@spudsdesign.com>
Signed-off-by: Spuds <spuds@spudsdesign.com>
! move preview to use the shorten_text function

Signed-off-by: Spuds <spuds@spudsdesign.com>
Signed-off-by: Spuds <spuds@spudsdesign.com>
Signed-off-by: Spuds <spuds@spudsdesign.com>
@eurich
Copy link
Member

eurich commented Jun 8, 2013

yep, and better worked out than my original PR 👍

Spuds added 3 commits June 8, 2013 15:57
Signed-off-by: Spuds <spuds@spudsdesign.com>
…ince there is an ACP for it

Signed-off-by: Spuds <spuds@spudsdesign.com>
Signed-off-by: Spuds <spuds@spudsdesign.com>
@Spuds
Copy link
Contributor Author

Spuds commented Jun 8, 2013

Think I got them all ... also found a few other areas where it could use the new / old function so changed them over as well.

norv added a commit that referenced this pull request Jun 8, 2013
Replace shorten_subject
@norv norv merged commit 204ed81 into elkarte:master Jun 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants