Joomla delete from page source Comments - joomla

I am trying to delete all mentioning of joomla from the page source of the following site:
http://signfit.multi-web-services.co.uk
In the page source its on around line 277 that i can't find where to delete the comments from, or If you inspect the element and then search it for joomla it returns with it present once.
This is the line that i am trying to delete:
<!-- JoomlaWorks "K2" (v2.6.4) | Learn more about K2 at http://getk2.org -->

You can find this on line 73 of
components/com_k2/k2.php
where you will see:
echo "\n<!-- JoomlaWorks \"K2\" (v2.6.8) | Learn more about K2 at http://getk2.org -->\n\n";
What I would recommend doing first is update to K2 2.6.8 as you are 4 versions behind, and then change this file as you wish. It's a core file so each time you update, you will have to perform this action every time.

Related

Is there any way for a section to link back to the table of contents in pandoc?

So I'm able to create a nice table of contents with pandoc --toc option, but I was wondering if there is any way of linking the header or a symbol near the heading back to the table of contents. For example, when you create a footnote in pandoc, it links the subscript number to the bottom of the page. At the end of the note, there is this little sign (↩︎) with a link for going back to the line where the footnote was. I'd like to do this with my table of contents for each header. I don't mind not use --toc, and instead manually writing out the table of contents, but I not sure whether this particular feature was available. Any tips would be very helpful!
A Lua filter can be used to add a link back to the TOC.
local link_to_toc = pandoc.Link({pandoc.Str '↑'}, '#TOC')
function Header (h)
h.content = h.content .. {pandoc.Space(), link_to_toc}
return h
end
Save the above into a file and pass it to pandoc via the --lua-filter (or -L) command line option.
Linking to a specific line in the TOC is not possible though.

iText7 html to pdf conversion with target-counter having dynamic target value not working

I have been looking into why the page numbers in my generated toc are not working on the latest (3.0.3) version of htmlpdf - even though the release note state that this is now supported.
The devil is in the detail, as noted in the example (https://kb.itextpdf.com/home/it7kb/examples/pdfhtml-support-for-generating-cross-references-for-toc-creation-with-target-counter-target-counters-css-properties) the following works very well:
.preface::before {
content: target-counter(url('#id1'), page) ' ';
}
But as soon as you change this to something more dynamic, in order to not have to not have to specify an entry for each topic you would like to have in the TOC it fails.
.preface::before {
content: target-counter(attr(href), page) ' ';
}
As also indicated in the logging by the following line:
WARN com.itextpdf.html2pdf.attach.impl.layout.PageTargetCountRenderer - Cannot resolve target-counter value with given target "attr(href)"
It looks like the "attr(href)" is taken as a literal and not resolved to the context it is being used in, eg. in this case extracting the tag's href value and using that to find the right page number.
Could this be fixed somehow - or can this be covered by some custom coding?
Thanks.
Using the latest version of the renderer (3.0.5 at the time of writing) effectively supports this properly!

What does the loggedin column of vBulletins session table mean?

In vBulletin 4.2 the session table has a column loggedin. Since VB doesn't seem to have a official database documentation, I want to know what exactly it means because the column it's a SMALLINT instead of simple boolean value.
My previous reverse engineering: 0 means not logged in. 1 and 2 is used for logged in users, but I can't see what's the difference. I have both regular user session and admin panel sessions with loggedin=2.
Tried to get more information by running grep on vBulletins php files, without luck .
So my concrete questions are:
What is the difference between sessions with 1 and 2?
Are there more states than 0, 1 and 2?
Do they even matter when vBulletin's code doesn't seem to use them?
I learned that my filter to *.php files broke greps recursive scanning method. The correct command to scan all php files for 'loggedin' (in quotes since vB use them this way on it's $vbulletin->session object) is:
grep -rn --include \*.php "'loggedin'" .
This gave a few results. Most interesting:
./includes/functions.php:7558: $vbulletin->session->set('loggedin', 2);
Opening functions.php we see the call and we can feel lucky that at least in the code vB developers to decide that a comment would be usefull:
if ($vbulletin->session->vars['loggedin'] == 1 AND !$vbulletin->session->created)
{
# If loggedin = 1, this is out first page view after a login so change value to 2 to signify we are past the first page view
# We do a DST update check if loggedin = 1
$vbulletin->session->set('loggedin', 2);
// ...
}
So we can say that 1/2 doesn't gave information about the type of session. It could be a regular user or also admin session. Altough loggedin indicates if the user already viewed some other pages or not, whyever vB devs need to devide this.

Summing XML Data in MSWord Mail Merge

I have a report card written in Word that uses an XML file for its input. In the XML file, if a student remains in the same section all three trimesters there will be one node for that class; if they change sections at the trimester they'll have one node for each section. The nodes look something like this (greatly simplified):
<ReportCardSectionFB Abs1="2" Abs2="11" CourseID="ELMATH1" CourseTitle="Math" PeriodStart="3" TeacherName="Jones, Jennifer" TermCode="Year" SectionID="ELMATH1-4" />
<ReportCardSectionFB Abs1="1.50" Abs2="6" CourseID="ELMATH1" CourseTitle="Math" PeriodStart="3" TeacherName="Smith, Tina" TermCode="Year" SectionID="ELMATH1-3" />
There is no indicator within the XML as to which trimester the node belongs to.
In the Word document, we're pulling the absence data with the following mail merge command:
{MERGEFIELD "ReportCardSectionFB[#PeriodStart='3']/ #Abs1" \# 0.# \* MERGEFORMAT }
That's not working in this situation: it only gets the absence data from the first node it comes across, i.e.: 2.0. Is there a way to get the sum of #Abs1 for all period 3 classes, i.e.: 3.5? If not, is there a way to only get the last #Abs1 for period 3, i.e.: 1.5?
I recommend you to use this 3rd party product, which can use xml as input and is capable of merging it with MS Word template. I is also much more powerful than the built-in Word's mail merge. You can see some examples here.
You could also try summing the absences in Synergy - there's a new checkbox under AttDef1, 2, etc. that adds up all the absences for the data range - Include all day data for the entire date range regardless of section enrollment or section timeframe. That way the absences should be the same for each section, if that works for your district.
You can also try the SET function in Word to nest the MERGEFIELDS as bookmarks and use the Word operator functions to then add the bookmarks.

Is there a name for this type of page navigation?

Just out of curiosity, is there a name for the kind of navigation I've been working on?
It looks like this:
<<first <previous 1 2 3 4 5 [...] 20 next> last>>
i.e. navigation where you've got x pages, but you don't want to show x links, you want to limit the amount of space taken up, so you show y links at a time, and indicate the existence of the other pages with an elision.
At some point in the middle, it would look like this:
<<first <previous [...] 8 9 10 11 12 [...] 20 next> last>>
with elisions on both sides.
Answering to just clear up this question. I hereby declare that it has no official name.
I also hereby make up the name 'elided pagination' for it.
It's called web pagination, search result pagination.
thresholded navigation pager?
Not sure what the ordinary version of this pagination scheme is called (if anything).
However, I came up with an advanced version of it capable of handling very large numbers of pages (where ellipses (...) skip successively larger blocks of pages as you get further away from either the current page or the endpoints).
I called my scheme "Logarithmic pagination" or "Logarithmic page navigation".
You can find it (with implementation) on stackoverflow here.

Resources