Submissions:Documentation: Difference between revisions

From AbhiprayaVedi
mNo edit summary
Tag: 2017 source edit
Tag: 2017 source edit
Line 5: Line 5:
Log in via PuTTY
Log in via PuTTY


You’ve already done this. You should be at a shell prompt (something like $ or >).
Now you should be at a shell prompt (something like $ or >).


Navigate to your MediaWiki installation directory
Navigate to MediaWiki installation directory


Typically it’s inside public_html or www. For example:
It’s inside public_html.


bash
bash
cd ~/public_html
cd ~/public_html
If MediaWiki is installed in a subfolder (e.g. wiki), go there:


bash
cd ~/public_html/wiki
Run the job queue script
Run the job queue script


Line 23: Line 20:
bash
bash
php maintenance/runJobs.php
php maintenance/runJobs.php
If your host requires PHP CLI explicitly, try:
If your host requires PHP CLI explicitly, try:


bash
bash
php-cli maintenance/runJobs.php
php-cli maintenance/runJobs.php
Or specify the full path to PHP if needed:
Or specify the full path to PHP if needed:


Line 33: Line 32:
Watch the output
Watch the output


You’ll see lines like:
We will see lines like:


Code
Code
Line 41: Line 40:


📌 Notes
📌 Notes
You can re‑run this command anytime you want to flush pending jobs.
We can re‑run this command anytime we want to flush pending jobs.


If you’re doing bulk edits (like re‑editing many articles to add semantic properties), it’s a good idea to run runJobs.php afterwards.
If are doing bulk edits (like re‑editing many articles to add semantic properties), it’s a good idea to run runJobs.php afterwards.


This won’t harm anything — it just processes the backlog immediately instead of waiting for page views to trigger jobs.
This won’t harm anything — it just processes the backlog immediately instead of waiting for page views to trigger jobs.

Revision as of 15:33, 3 June 2026

Technical

Semantic Mediawiki Database Updation

How to run runJobs.phpthrough PuTTY

Log in via PuTTY

Now you should be at a shell prompt (something like $ or >).

Navigate to MediaWiki installation directory

It’s inside public_html.

bash cd ~/public_html

Run the job queue script

Use PHP to execute the maintenance script:

bash php maintenance/runJobs.php

If your host requires PHP CLI explicitly, try:

bash php-cli maintenance/runJobs.php

Or specify the full path to PHP if needed:

bash /usr/local/bin/php maintenance/runJobs.php Watch the output

We will see lines like:

Code Running job: RefreshLinksJob Running job: SMW\UpdateJob When it finishes, the queue is cleared.

📌 Notes We can re‑run this command anytime we want to flush pending jobs.

If are doing bulk edits (like re‑editing many articles to add semantic properties), it’s a good idea to run runJobs.php afterwards.

This won’t harm anything — it just processes the backlog immediately instead of waiting for page views to trigger jobs.

Documentation: Article Card Templates for AbhiprayaVedi

This guide explains the different card templates we have created for the Main Page and article pages. It is written for Editors and Admins.


----


1. Overview of Card Templates


We have three main card templates:


Template Purpose Best Used On Image Size Recommended
ArticleCard General article preview Main Page, Related Articles 400x250px
StoryCard Top Stories / Highlighted stories Main Page 400x250px
FeaturedCard Large hero-style featured article Main Page (Featured section) 800x400px


All cards automatically pull data from the article’s `

-->` template (Display Name, Introduction, Author, Date, Image1, etc.).



2. How to Use Each Card

A. ArticleCard (Most Commonly Used)


Usage:

```wikitext

```


Example:

```wikitext

```


Where to use:

- Main Page → Recent / Top Stories sections

- Bottom of individual article pages → Related Articles


----


B. StoryCard


Usage:

```wikitext


{{{2}}}


```


Example:

```wikitext


{{{2}}}


```


Where to use:

- Main Page → "🔥 Top Stories" section


----


C. FeaturedCard (Large Banner Style)


Usage:

```wikitext



```


Example:

```wikitext



```


Where to use:

- Main Page → "✨ Featured" section (only 1–2 cards)


----


3. Step-by-Step Guide for Editors

Step 1: Publish an Article

1. Submit article through the form.

2. Review and edit.

3. Move page from `Submissions:` to `Main:` namespace.

4. Add the category `[[Category:Recent Publications]]` at the bottom.


Step 2: Add Article to Main Page

1. Go to the Main Page.

2. Add the card in the appropriate section using the syntax above.

3. Save.


Step 3: Add Related Articles at Bottom of Article

1. Open the article in source mode.

2. Add at the bottom (before the Edit button):


```wikitext

== Related Articles ==

```


----


4. Best Practices

- Always use published articles (in Main namespace) in cards.

- Use Image1 from the form for best results (it appears as thumbnail in cards).

- Keep Introduction field short and engaging (first 2–3 lines work best in cards).

- Update cards on the Main Page periodically (once every few days).


----


5. Future Improvements (Optional)

- We can later use Semantic MediaWiki to automatically show latest 6 articles without manual updating.

- We can create a "Related Articles" section that auto-suggests based on category.


-----