DPL talk:FAQ

From FollowTheScore
Jump to: navigation, search

Do not include template content on dpl list

I'm using a template to include footer information on my pages. How do I *not* make this content from this template not appear on my <dpl> list? --JoZ 23:27, 5 March 2009 (UTC)


I'm wondering if DPL can help with my situation. I would like to recreate the "What Links Here" page functionality on an article page. Basically each article would show all of the other pages/articles that refer to it? I've read through this site and it seems DPL is the answer, but I havent read anything specific to this. I'm pretty new to the whole WIKI so sorry if this is the wrong forum for this...

Dsilve 02:03, 18 January 2008 (CET)

This is very easy with DPL. Just use linksto with PAGENAME or FULLPAGENAME. Example:
Pages linking to the current page:

Extension:DynamicPageList (DPL), version 3.2.1: Warning: No results.

Gero 08:07, 18 January 2008 (CET)



Err... Why not create the FAQ using a DPL?

Each FAQ goes into a separate page, and the DPL lists them all. I actually tried this on my own site... the problem was that I wanted to create a TOC to list the questions at the top of the page, so I did something like "==%TITLE%==", however, the TOC appeared to be inside the DPL!

This was a problem because I wanted to split the FAQ into sections like Technical questions and General questions, which is naturally acheived by subcategories of the FAQ category, then I used a separate DPL for each subcategory. This messed up because ... er TOC was messy? I gave up in the end.

Just thought though! --Dmb 22:16, 15 September 2007 (CEST)

Further, the articles would be sorted by hits... FAQ baby! This would be displayed on a page with a 'create an answer' inputbox. I dare you to say it should not be so! (Make it so?) --Dmb 22:18, 15 September 2007 (CEST)


I'm trying to work on this website
http://www.collaborativelandscape.org/wiki/ARCH_728_2007
We are using DPL to make categories.
If you'll look under Department/University Resources there are two pages,
NDSU Homepage and Architectural Department Homepage that I want to actually link to external pages.
NDSU Homepage needs to direct people to www.ndsu.edu

I've tried creating a page called NDSU_Homepage and then from there redirecting people to http://www.ndsu.edu but that doesn't work for some reason it just leaves me at the redirect page.

My category code looks like: <br> |align="left" width="33%" style="background-color:#FFFFFF; border-top:1px solid #808080; border-bottom:1px solid #808080;padding-top:10px; padding-right:10px; padding-left:0px; padding-bottom:10px;" valign="top"| <h2 style="margin:0;background:#f3f3f3;font-family:sans-serif;font-size:120%;font-weight:bold;border:1px solid #808080;text-align:left;color:#000;padding-left:0.4em;padding-top: 0.2em;padding-bottom:0.2em;">'''[[:Category:Department/University Resources|Department/University Resources]]'''</h2>

<DPL>
category=Department/University Resources
ordermethod=title
order=ascending
redirects=include
count=10
</DPL>

My redirect page looks like:
#REDIRECT [http://www.ndsu.edu]
[[Category:Department/University Resources]]
Do you have any suggestions? Thanks

Reply

  1. Wiki redirects expect a wiki PAGE link not an url.
  2. So your problem has nothing to do with DPL
  3. Your Homepage looks nice but the wiki code contains many pieces which are very similar. You should consider to put the DPL statement into a template page (you must use DPL parser function syntax in that case). Maybe also some of your layout-related code could be moved to such a template.

Gero 09:56, 7 November 2007 (CET)

?

Ok I'll take a look at templates that'd be great to keep our pages to a similar design. However are you saying there is no way to have a link under my dpl category that directs people to an outside site? Or is there a way and I'm just missing it?


You can always create links to outside URLs as part of normal wiki text or as part of DPL output. But the #REDIRECT does not accept external URLS. You would have to use javascript to create an automatic forwarding. See the source of the following DPL statement: Link to Google coming from DPL output ...

firstrevisionsince parameter

I'm using the DPL parameter "firstrevisionsince=dateandoptionaltime" , to display articles after 20080430. One results is as follows: 23:57, 2 May 2008 : Insurance Programs . . JSmith --- I would like for the end result to be: Insurance Programs --Displaying only the article and removing the timestamp and the editor's name. How can I turn the timestamp/editor results off?


Could you help me, please?

I need a little query, which lists all images used by a given article. It would be such simple ...:

{{#dpl:
|namespace=image
|linksfrom={{FULLPAGENAME}}
}}

... if linksfrom would list links to image-pages, but it doesn't :-(
Any idea? Sorry for my lack of English ... --WiMu 11:54, 30 April 2008 (CEST)

Reply

There was a similar request recently which lead to the new command imageused. But this works the other way round: it finds all articles which contain a certain image. See Issue:Imagelinks criteria. Maybe you can extend the code in a similar way? Upload an enhanced version of the source and I will test, document and publish it as part of the next release .. Gero 12:19, 30 April 2008 (CEST)

Thanks for the quick reply. I already know the imageused-function; well ... I could do something like this:
<dpl>
resultsheader={{#dpl: imageused=
resultsfooter=|titlematch={{FULLPAGENAME}}}}
namespace=image
mode=inline
inlinetext=|
</dpl>
... (this will not work as the inner query shows links instead of plain text ... but you got the idea?). However in "my" Wiki we have about 5000 images, so this will not work anyway. I'm sorry, but I have no idea how to extend the code as I'm still new to php ... but I'll take a look at it. Greetings --WiMu 13:14, 30 April 2008 (CEST)
For somebody who knows programming in general, php is not too hard to understand. Much easier than perl I would say, and a little more comfortable than java because it is more a script language than a traditional, strongly typed language. Anyway, the kind of change you would have to make is not so big. Maybe 50 lines of code. And you really do not have to understand the whole source text to add your feature...
5000 images should not be the problem if the SQL code that is generated by DPL is efficiently designed. Gero 16:34, 30 April 2008 (CEST)
private static $WiMusscriptknowledge = NULL; ;-) ... but I asked someone to help me. Greetings --WiMu 09:54, 1 May 2008 (CEST)
Good. Please make sure that you use the sources from the latest version (1.72) as a starting point. Good luck! Gero 16:25, 1 May 2008 (CEST)
I tried to implement it and it seems to work (see the diff here). In order to avoid confusion with "imageused" I named it "imagecontainer" (because you specify the pages that contain the images listed) , if you have a better name then please change it. --J* 09:49, 5 May 2008 (CEST)

Weird query

Hey, I would like to make weird query in DPL. I've got page named "FOO" and it has ie. 4 sections. On the other page I want DPL to show name of the USER who was the last editor of "FOO" page (last edited section). I would like also DPL displays TITLE of this section and last revision DATE of this article. I know I can display title of this page, last user (addlasteditor) and date (addeditdate), but I don't know if there is possibility to show last edited section. Sorry for my english, I hope You will understand me. Thanks --Blaze 21:25, 6 May 2008 (CEST)

Reply

I think I understood your question quite well. But I have to say that there is no such functionality at the moment. You can download the sources and add the desired functionality if you want (or ask someone you knopw to do it for you). I will test it and integrate it into the next release. Gero 22:42, 6 May 2008 (CEST)

%DPL-1.7.4-ERROR: Wrong '$0' parameter

I recently upgraded to mw 1.12 and upgraded DPL to 1.74. I consistently get the error:

%DPL-1.7.4-ERROR: Wrong '$0' parameter: 'namespace'! Help: $0= empty string (Main).

everywhere I use 'namespace=' with any parameters except blank. The site is here. Any help would be greatly appreciated!

Dean

Solved?

So far I never encountered such a problem. If it still exists, you should give me access to your website and point me to a page where it happens. Gero 18:43, 15 August 2008 (CEST)

Question about dominantsection

Do you think you can help me with a question about dominate section? I have an artical structure like so:


Page to pull DPL data From

  • Overview
  • Component 1
    • Goal
    • Issues
  • Component 2
    • Goal
    • Issues


By default DPL will place all the Goal text (from Component 1 and Component 2) in one cell in the Goal column of the sortable table. If I use dominatesection=3 I can get DPL to not combine Goal of Component 1 to Goal of Component 2, but unfortunately it keeps the information on the same table row so it just keeps extending out to the right. Is it possible to put Component 2 information on a second row of the dynamic table? Thanks for the help and the great extension.

allrevisionssince

How do I get the allrevisionssince parameter to work? Do I place the parameter within

Extension:DynamicPageList (DPL), version 3.2.1: Error: No selection criteria found! You must use at least one of the following parameters: category, namespace, titlematch, linksto, uses, createdby, modifiedby, lastmodifiedby, or their 'not' variants


Extension:DynamicPageList (DPL), version 3.2.1: Warning: No results.

within a wiki text? Or do I need to change a php setting within a file in my wiki?

see Test revisions
Gero 08:15, 30 November 2008 (UTC)

Showing a tag with DPL variables

Hi, it seems that DPL variables don't work in a tag.

The tag i use is from Extension:CommunityVoice  :
{{#tag:ratings:scale||category=""|title=ABC}}

It's supposed to output :
<div id="cv_ratings_scale__ABC class="communityvoice-ratings-scale"> .....</div>

However, when using it with %TITLE% variable in DPL, %...% seems to cause a bug. The result becomes :
<div id="cv_ratings_scale__TITLE class="communityvoice-ratings-scale"> .....</div>

Using it with %PAGE%, it outputs:
<div id="cv_ratings_scale__PAGE" class="communityvoice-ratings-scale"> .....</div>

%...% isn't recognized here. do you know there's any method to deal with it? Thanks! --Dullmau 10:48, 28 June 2010 (UTC)

Problem with FAQ #7 (Getting pages with references to templates...)

While trying to do something similar to FAQ no.7 (simple Todo lists) without success, I realised that the given example exhibit the same problem I'm having: if more than one todo template is present on the same page, the dpl output is messed up. Is there a problem with this example? Pierrem100 01:45, 10 September 2010 (UTC)

Ok, problem solved. The problem lies with the include statement include={todo2}:1,{todo2}:2. The statement is valid according to doc but it produces odd output when more than one template are found on a page. Replacing with the simpler include={todo2}:1:2 works fine. Pierrem100 01:44, 21 September 2010 (UTC)
Thanks for finding this out. You are absolutely right. The two syntactical variants are different and only one of them works in this case. 15:16, 21 September 2010 (UTC)