Extension talk:BedellPenDragon

About this board

Template:InvisiblePageSummary

1
Jamiehutber (talkcontribs)

Missing template.


Do anybody know what was contained in this template?

Reply to "Template:InvisiblePageSummary"

Template:Randomly_featured_article where is?

4
Orthophilos (talkcontribs)

The Polywiki is out of order. I installed this extension but I need this template to just get a slice a article to show in my portal page and a link do redirect to the article . I have not found a way to do this just using BedellPenDragon extension,and I having difficulties to make a template like that by myself.  Does anyone know where could I get the Template:Randomly_featured_article or how can I handle this ?

Dshinks (talkcontribs)

Hi Orthophilos,

I've just installed this myself for exactly the same purpose, and had the same problem.

I've managed to create myself a simple replacement for the Featured Article functionality. Feel free to use as a starting point if if it helps.

N.B. This solution uses an extension called Labeled Section Transclusion to handle getting a selected section (Denoted with the #lst parser function).

To Call the Template (this example, uses a category called "Main Page Feature")

<randompageincategory cat="Main Page Feature" firstitem="{{Feature|PageName=" lastitem="}}" parse="yes"/>


Template:Feature

<div style="border:2px solid green;"><div style="background-color:green;color:white">'''Featured Page:'''{{{PageName}}}</div>

{{#lst:{{{PageName}}}|summary}}

<div style="text-align:right;">[[{{{PageName}}}|Read More...]]</div></div>

Dshinks (talkcontribs)

p.s. I've set up the template to include a section of the article labeled as "summary" using Labeled Section Transclusion.

Orthophilos (talkcontribs)

thanks!

Reply to "Template:Randomly_featured_article where is?"

Two mods for your brilliant extension

2
Mermeladomermelado (talkcontribs)

After installing your mod, I realized I needed two implementations for my needs and I decided to share with you (I hope you do not mind that).

First I found a bug in the extension translation. When a page or template tags <translate> is transcluded, they are not processed, but print on screen and is very ugly.

Second, when the article is very long, it may be interesting to reduce it in size and add a link to the relevant page.

To remove tags from translation, you use the parameter deltranslatetag = "true" and to shorten the text and make if it exceeds the number of characters the link indicated there appears to use the parameter cutter= "xx" where xx is the maximum number of characters to display.

The code It is divided into two parts, the first can be inserted in many places and have chosen just after:

$replace = '';
                if ( isset( $params['replace'] ) ) {
                        $replace = $params['replace'];
                }

And then inserts this code:

// Mod mermelado
                $deltranslatetag = false;
                if ( $params['deltranslatetag'] == "true" ) {
                        $deltranslatetag = true;
                }
                $cutter = '';
                if ( isset( $params['cutter'] ) ) {
                        $cutter = $params['cutter'];
                }
                // Fin Mod mermelado

The second part can also be inserted in many places, I chose to put it after the following code:

if ( $replace ) {
                        $output = str_replace ( $replace, $title->getFullText(), $output );
                        }

And then inserts this code:

//Mod Mermelado

                if ( $deltranslatetag ) {
                  
                         $replace1 ="<translate>";  $replace2 ="</translate>"; $replace3 ="<languages/>";
                         $output = str_replace ( $replace1, '', $output );
                         $output = str_replace ( $replace2, '', $output );
                         $output = str_replace ( $replace3, '', $output );
                         }

                if ( $cutter ) {

                if(strlen($output) > $cutter) { $output = substr($output, 0, $cutter).'...<center>[['.$title->getFullText().'|'.wfMessage( 'articlepage' ).'...]]</center>'; }
                               }
                                        //Mod Mermelado fin

Note: I have used the existing message 'articlepage' , but everyone is free to use the text that seems most appropriate.
I hope my mod seems useful to you, a greeting: mermelado.

BrentLaabs (talkcontribs)

Just a note as to why you haven't heard back from anyone: the creator of this extension has been banned from WMF wikis forever. So if you want to provide feedback, I'd suggest going to the Github issue page instead.

Reply to "Two mods for your brilliant extension"

Missing templates with /doc

3
76.19.144.178 (talkcontribs)

Hey there,

We just started using Mediawiki a couple of weeks ago; thus this question might be slightly misplaced (because we do not yet fully understand the setup). I imported all the necessary templates and it looks pretty good so far. One exception: I keep getting a huge list with "needed pages", which looks like this:

TEMPLATE_NAME/doc (so there is always a "/doc" added to an existing template's name):

  • Template:Documentation/end box2/doc‏‎ (1 link)
  • Template:Template other/doc‏‎ (1 link)
  • Template:Documentation/start box/doc‏‎ (1 link)
  • Template:Tl/doc‏‎ (1 link)
  • Template:Documentation/start box2/doc‏‎ (1 link)
  • Template:Documentation/template page/doc‏‎ (1 link)
  • Module:Message box/doc‏‎ (1 link)
  • Template:FASummary/doc‏‎ (1 link)
  • Template:Fmbox/doc‏‎ (1 link)
  • Template:Infobox/doc‏‎ (1 link)
  • Template:Lineclear/doc‏‎ (1 link)
  • $1‏‎ (1 link)
  • Template:PageSummary/doc‏‎ (1 link)
  • Template:Documentation/doc‏‎ (1 link)
  • Template:Pp-meta/doc‏‎ (1 link)
  • Template:Documentation/docspace/doc‏‎ (1 link)
  • Template:Pp-template/doc‏‎ (1 link)

I don't really understand what is going on here... Thanks for any advice! Best, Goofy

Leucosticte (talkcontribs)

When you go to Special:Export, you should check the box that says "Include templates"; then you'll get those documentation pages.

76.19.144.178 (talkcontribs)
Reply to "Missing templates with /doc"

Not including Tags when displaying article

4
Wade.courtney (talkcontribs)

Hi,

How do I keep the Category from being transcluded with the <randompageincategory> tag. I've tried all of the partial transclusion tags and none of them are effective.

Thanks,

Wade

Leucosticte (talkcontribs)

Oh, you mean the exclude parameter? Yeah, I don't use that anymore, I just use parserfunctions to screen against the Category namespace being transcluded. E.g., using {{#ifeq: {{NAMESPACE}}|Category| ... | ... }} in your templates might do the job for you.

Wade.courtney (talkcontribs)

Ohh, Ok thanks.

I guess it's time for me to learn how to build a template :)

Thanks for all of your help.

Wade

Reply to "Not including Tags when displaying article"

Export of Templates failed

6
Wade.courtney (talkcontribs)

Hi,

I tried to export your templates following your instructions, when I tried to import them into my wiki, I got an error that said there were no files to import.

W

Leucosticte (talkcontribs)

Hmm, I'm not sure why. Usually that happens when you try to export pages that don't exist. It will still give you a file, but it won't have anything to import in it. At any rate, ChildWiki.net probably has more up-to-date templates, so you might want to use that site as your source. That list of templates will rapidly get outdated, too; maybe I should get rid of it because it will end up confusing people.

Wade.courtney (talkcontribs)

What happened to the list of templates?

Leucosticte (talkcontribs)

I got rid of them because I was concerned the list was becoming outdated and had some nonexistent templates in it. If you want to add the list back and maintain it, be my guest.

Wade.courtney (talkcontribs)

OH, ok. How do I know which templates to download from the site you referenced above.

Sorry, I'm still kind of a noob.

Thanks,

Wade

Leucosticte (talkcontribs)

That's another issue; it depends on what you're trying to accomplish. If you want to just give me sysop rights on the wiki in question, I can scope out the scene and do it for you. Otherwise, you'll have to describe the situation in more detail.

Reply to "Export of Templates failed"
Wade.courtney (talkcontribs)

I get this now: Fatal error: Class 'SpecialReasonList' not found in C:\webapps\mtsitwiki\includes\SpecialPageFactory.php on line 335

Because I added this into my localsettings.php


$wgAutoloadClasses['SpecialReasonList'] = __DIR__ . '/SpecialReasonList.php'; $wgSpecialPages['ReasonList'] = 'SpecialReasonList'; $wgBedellPenDragonGlossaryIntros[] = 'MediaWiki:Reasonlist-intro'; $wgBedellPenDragonGlossaryTitlePropnames['ReasonList'] = 'bpd_reason_title'; $wgBedellPenDragonGlossarySummaryPropnames['ReasonList'] = 'bpd_reason_summary'; $wgBedellPenDragonGlossaryWikifyTitles['ReasonList'] = true; $wgBedellPenDragonGlossaryStripFromFront['ReasonList'] = 'Reason:'; $wgBedellPenDragonGlossaryReplace['ReasonList'] = array ( "\n\n" => "\n\n:" ); $wgBedellPenDragonGlossaryAuthor['ReasonList'] = false; // or 'bpd_reason_author' if you prefer $wgSpecialPageGroups['ReasonList'] = 'other';

Commenting them out does nothing to fix the problem and now my special pages page is broken.

Can you help me fix it?

W

Wade.courtney (talkcontribs)

I got my special pages page back.

I'm kind of confused by the instructions. Do I need to create a ReasonsList? Also you mention farther down the page about creating namespaces. Why?

I'm totally confused.

Thanks W

Leucosticte (talkcontribs)

Sorry, I've made some edits now to try to clarify it. No, you don't have to create a ReasonsList if you don't want one. The concepts behind what make the various lists and feeds and the templates that rely on them work are probably kinda confusing; I confuse myself sometimes, and I created them.

Part of the problem is that we're working with templates and parserfunctions. Tim Starling described MediaWiki wikitext with ParserFunctions as "the ugliest, most inefficient programming language known to man". Nested templates make the situation worse because now you have not only a bunch of parserfunctions with double curly braces but template transclusions with double curly braces and template parameters with triple curly braces. But if I don't use that system, then I have to hardcode everything, and then it's not open for the users to edit. Unless of course I use Scribunto to implement this stuff, but I'm not familiar with how to write modules.

Reply to "Fatal Error"

When trying to create this template I ge the blank screen.

5
Wade.courtney (talkcontribs)

<randompageincategory cat="Featured articles" template="Template:FA" propreplace="$2" propreplacewith="fa_summary" replace="$1" parse="true" stripreftags="true"/>

Leucosticte (talkcontribs)

Please follow the instructions at Manual:Errors_and_symptoms#You_see_a_Blank_Page so we can get more debugging information. Specifically, add the following lines to the LocalSettings.php file, underneath the <?php:

error_reporting( E_ALL );
ini_set( 'display_errors', 1 );

Thanks.

Wade.courtney (talkcontribs)

I changed the value of cat (Did you know?) to be the category I want to use. I saved the template and this was the resulting error message:

Fatal error: Call to a member function getText() on a non-object in C:\webapps\mtsitwiki\extensions\BedellPenDragon\BedellPenDragon.php on line 294

Leucosticte (talkcontribs)

Go ahead and upgrade to the latest version and give it another try. The changes may or may not fix your problem; if not, keep coming back; we'll get it eventually. I would say, "Switch over to Semantic MediaWiki" but I don't think it has the capability you're looking for.

Leucosticte (talkcontribs)
Fixed

I ran into the same problem today and fixed it. That error was cropping up whenever the template page mentioned in the template parameter (template="foo") was nonexistent.

Reply to "When trying to create this template I ge the blank screen."

When I use this line in a nested table I get a bunch of repeating nested tables.

3
Wade.courtney (talkcontribs)
style="width: 50%;" vertical-align: top"|
Did you Know?
<randompageincategory cat="Did you know?" content="true" parse="true"/>
IT Announcements
This is an IT Announcement
Reply to "When I use this line in a nested table I get a bunch of repeating nested tables."

Error upon implementation

12
Wade.courtney (talkcontribs)

I get the following error when I try to implement this extension:

[1d116960] 2013-11-07 22:40:33: Fatal exception of type MWException

I am using: MediaWiki 1.21.1 PHP 5.3.24 (cgi-fcgi) MySQL 5.1.70-community

Thanks,

Wade

Leucosticte (talkcontribs)

Hi Wade, this extension has only been tested with MediaWiki 1.22. Please enable the debugging settings described at Manual:How to debug so you can get a more detailed error message. Specifically, put at the end of your LocalSettings.php:

$wgShowSQLErrors = true;
$wgDebugDumpSql  = true;
$wgShowDBErrorBacktrace = true;
$wgShowExceptionDetails = true;

That will help us isolate the problem. Also, be sure to update your code to the most recent version. Thanks.

Wade.courtney (talkcontribs)

Thanks for the reply. Here is what I get with debugging: Error: invalid magic word 'setbpdprop'

Backtrace:

  1. 0 C:\webapps\mtsitwiki\includes\MagicWord.php(236): MagicWord->load('setbpdprop')
  2. 1 C:\webapps\mtsitwiki\includes\parser\Parser.php(4885): MagicWord::get('setbpdprop')
  3. 2 C:\webapps\mtsitwiki\extensions\BedellPenDragon\BedellPenDragon.php(71): Parser->setFunctionHook('setbpdprop', 'BedellPenDragon...')
  4. 3 [internal function]: BedellPenDragon::setupParserFunctions(Object(Parser))
  5. 4 C:\webapps\mtsitwiki\includes\Hooks.php(255): call_user_func_array('BedellPenDragon...', Array)
  6. 5 C:\webapps\mtsitwiki\includes\GlobalFunctions.php(3883): Hooks::run('ParserFirstCall...', Array)
  7. 6 C:\webapps\mtsitwiki\includes\parser\Parser.php(270): wfRunHooks('ParserFirstCall...', Array)
  8. 7 C:\webapps\mtsitwiki\includes\cache\MessageCache.php(824): Parser->firstCallInit()
  9. 8 C:\webapps\mtsitwiki\includes\cache\MessageCache.php(802): MessageCache->getParser()
  10. 9 C:\webapps\mtsitwiki\includes\Message.php(696): MessageCache->transform('$1 - {{SITENAME...', true, Object(Language), Object(Title))
  11. 10 C:\webapps\mtsitwiki\includes\Message.php(496): Message->transformText('$1 - {{SITENAME...')
  12. 11 C:\webapps\mtsitwiki\includes\Message.php(553): Message->toString()
  13. 12 C:\webapps\mtsitwiki\includes\OutputPage.php(835): Message->text()
  14. 13 C:\webapps\mtsitwiki\includes\OutputPage.php(878): OutputPage->setHTMLTitle(Object(Message))
  15. 14 C:\webapps\mtsitwiki\includes\Article.php(554): OutputPage->setPageTitle('MTS Information...')
  16. 15 C:\webapps\mtsitwiki\includes\actions\ViewAction.php(44): Article->view()
  17. 16 C:\webapps\mtsitwiki\includes\Wiki.php(439): ViewAction->show()
  18. 17 C:\webapps\mtsitwiki\includes\Wiki.php(305): MediaWiki->performAction(Object(Article), Object(Title))
  19. 18 C:\webapps\mtsitwiki\includes\Wiki.php(565): MediaWiki->performRequest()
  20. 19 C:\webapps\mtsitwiki\includes\Wiki.php(458): MediaWiki->main()
  21. 20 C:\webapps\mtsitwiki\index.php(59): MediaWiki->run()
  22. 21 {main}
Leucosticte (talkcontribs)

By the way, I inadvertently removed BedellPenDragon.i18n.php earlier and only recently added it back. I am concerned about the possibility that you might be missing that file. Please confirm that you have updated to the latest version of the extension (v1.0.4) and that you have BedellPenDragon.i18n.php. Then we can resume troubleshooting. Thanks.

Also, you may want to see what happens if you upgrade to MediaWiki 1.22. See Download_from_git#Download. I don't know if that has any relation to your problem; I forget if I relied on anything that's not available in 1.21.

Wade.courtney (talkcontribs)

I made the changes you asked, except for upgrading the wiki. The title of the random article is now displayed, I tried using the content parameter, but I still only get the page title.

Let me tell you what I'm trying to accomplish and you can tell me if I'm even using the right extension.

What I want is for a random article to display on the main page whenever someone comes to the page. Or may an excerpt with a link to the article if it is very long. Somethink like wikipedia does with the Today's Featured Article section.

Do you know what I mean?

Thanks for the help

Wade

Leucosticte (talkcontribs)
Wade.courtney (talkcontribs)

I'll read that, but I just realized I hadn't updated to the latest version of the extension. Duh. Sorry.

I do get a random article now.

Thanks for all your help

Wade

Wade.courtney (talkcontribs)

Is the Special:RandomPage required for Blurb to work?

Leucosticte (talkcontribs)

I don't understand your question? Blurb does randomly select a page using the same methods as Special:RandomPage. It probably wouldn't be too hard to modify the code to use a different selection method, though.

Wade.courtney (talkcontribs)

I went to the page for Special:RandomPage and it said that it had been removed.

Wade.courtney (talkcontribs)

Nevermind. I'm still learning about all this so I'm still learning.

Although when I enable Blurb through the localsettings.php, I get a blank wiki.

Thanks for your patience.

Wade

Leucosticte (talkcontribs)

No problem; when you report difficulties, it helps me learn what needs to be improved in the code and/or documentation. So are you getting the white screen of death? Last I checked, Extension:Blurb was no longer working with current versions of MediaWiki. Sorry, I forgot to mention that. I might take a look at it later and see what needs to be fixed.

Reply to "Error upon implementation"
Return to "BedellPenDragon" page.