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

[FEATURE] adds HighlightAuthorViewHelper to highlight an Author ()by … #30

Merged
merged 17 commits into from
Jan 10, 2022

Conversation

karliwalti
Copy link
Contributor

adds HighlightAuthorViewHelper to highlight an Author.

custom html is wrapped around author name

Example in a citestyle doc:

		<publications:format.highlightAuthor author="{author}" before="<b>" after="</b>" searchterms="{filter.author}" >
			<publications:format.initials>{author.firstName} </publications:format.initials>{author.lastName}
		</publications:format.highlightAuthor>

TODO: (done, but will be pushed later when #27 and #28 are merged to prevent conflicts)

  • Add flexform to make this an option
  • update citestyles

@kfumy
Copy link
Collaborator

kfumy commented Nov 15, 2021

one question to karliwalti: beside of the viewhelper, all templates still have to be changed?

@karliwalti
Copy link
Contributor Author

one question to karliwalti: beside of the viewhelper, all templates still have to be changed?

@kfumy yes, as mentioned citestyles need to still be updated, but I wanted to wait until other merge requests are in that might cause conflict. Since they are now in, I will add updates in coming days.

@einpraegsam thanks for picking up the formatting conflicts. Happy to resolve this. I tried to maintain style of previous code and will pay extra attention to https://www.php-fig.org/psr/psr-12/

Copy link
Collaborator

@kfumy kfumy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is a mismatch between flexform definition and language definition:
flexform: flexform.pi1.template.highlightAuthors
db.localllang_db.xlf: flexform.pi1.filter.highlightAuthors

template versus filter ;-)

@karliwalti
Copy link
Contributor Author

there is a mismatch between flexform definition and language definition: flexform: flexform.pi1.template.highlightAuthors db.localllang_db.xlf: flexform.pi1.filter.highlightAuthors

template versus filter ;-)

Thank you for picking this up.

I am facing the current challenge that citestyle9 is not working on my testenv from branch develop. Is this just mine or a common issue?

@kfumy
Copy link
Collaborator

kfumy commented Nov 17, 2021

no, citestyle9 is broken for me too (in the FE):
TYPO3 Exception tells me:

(1/1) TYPO3Fluid\Fluid\Core\ViewHelper\Exception

Undeclared arguments passed to ViewHelper In2code\Publications\ViewHelpers\Format\MonthNameFromNumberViewHelper: suffix. Valid arguments are: month, limit
in /app/vendor/typo3fluid/fluid/src/Core/ViewHelper/AbstractViewHelper.php line 478

@kfumy
Copy link
Collaborator

kfumy commented Nov 17, 2021

did not find the error yet in the citestyle.

@kfumy
Copy link
Collaborator

kfumy commented Nov 17, 2021

on line 208 in citestyle9.html there is a suffix=" " declaration. That causes the error.

@kfumy
Copy link
Collaborator

kfumy commented Nov 17, 2021

ah, it is because the pull request #38, which changes the responsibel viewhelper ist not integrated.
...

@karliwalti
Copy link
Contributor Author

ah, it is because the pull request #38, which changes the responsibel viewhelper ist not integrated. ...

I removed this now with a comment to add it back when available.
Also added style updates for citestyle4 and 9

@kfumy
Copy link
Collaborator

kfumy commented Nov 17, 2021

ah, it is because the pull request #38, which changes the responsibel viewhelper ist not integrated. ...

I removed this now with a comment to add it back when available. Also added style updates for citestyle4 and 9

it works now. in FE there is a strange whiteroom between year and page
Bildschirmfoto 2021-11-17 um 15 20 31
es

@kfumy
Copy link
Collaborator

kfumy commented Dec 16, 2021

today, I worked with the publications again and there is a small point, where I can´t discover the reason of misformatting.
Sometimes in a list of publications the '.' or ';' after year is correct, sometimes there is a space, look at the screenshot. It appeares on all Citestyles, here on "Vancouver for Web".
Bildschirmfoto 2021-12-16 um 16 18 32
.

put all on one line to avoid whitespace rendering after year
@karliwalti
Copy link
Contributor Author

I noticed a similar thing already with the author list rendering. I do not have a good explanation for it, but the cause is following:
When rendering is done with f:render of a section in same file, it seems that line breaks are included in the html, but this is rather random, sometimes it is rendered and sometimes not.

The only fix I have for this is to put all on one line without break. Not sure if there is a better way with Fluid.

@kfumy could you check whether this fixes the issue for you with citestyle9?

@kfumy kfumy merged commit df90470 into in2code-de:develop Jan 10, 2022
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.

3 participants