WikiDJ

The Artists' Encyclopedia, community-powered.

User Tools

Site Tools


artists_by_country

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
artists_by_country [2025/07/31 15:24] adminartists_by_country [2025/08/05 03:21] (current) admin
Line 1: Line 1:
 +~~META: description = Explore the growing encyclopedia of DJs, producers, and music crews on Wiki-DJ. Discover new artists and contribute to our community-driven database of electronic music culture.~~
 ~~NOCACHE~~ ~~NOCACHE~~
-<php> 
-global $ID; 
- 
-// Load the struct helper plugin 
-$struct = plugin_load('helper', 'struct'); 
-if(!$struct) { 
-    echo 'Error: Struct plugin could not be loaded.'; 
-    return; 
-} 
- 
-// Find all pages with the 'wikidj_schema' 
-$pages = $struct->findPages('wikidj_schema'); 
- 
-// Start our HTML table 
-echo '<table class="table table-striped table-hover">'; 
-echo '<thead><tr><th>Artist</th><th>Country</th><th>Status</th></tr></thead>'; 
-echo '<tbody>'; 
- 
-// Loop through each page found 
-foreach($pages as $page) { 
-    // Get the struct data for the page 
-    $data = $struct->readPage($page['id'], 'wikidj_schema'); 
- 
-    // Get the specific values we want, with a fallback 
-    $country = $data['country'] ?? 'N/A'; 
-    $status = $data['status'] ?? 'N/A'; 
-     
-    // Get the page's title (the artist's name) and build the URL 
-    $pageTitle = p_get_metadata($page['id'], 'title'); 
-    $url = wl($page['id']); 
- 
-    // Print the table row with the correct, working link 
-    echo '<tr>'; 
-    echo '<td><a href="' . $url . '">' . hsc($pageTitle) . '</a></td>'; 
-    echo '<td>' . hsc($country) . '</td>'; 
-    echo '<td>' . hsc($status) . '</td>'; 
-    echo '</tr>'; 
-} 
- 
-echo '</tbody>'; 
-echo '</table>'; 
-</php> 
- 
- 
----- struct table ---- 
-schema: wikidj_schema 
-cols: page as "Artist" "{{include>system:link_helper?VAR=%page%}}", country, state_or_town, status 
-sort: country 
-dynfilters: yes 
----- 
- 
----- struct table ---- 
-schema: wikidj_schema 
-cols: %page%, country, state_or_town, status 
-sort: country 
-dynfilters: yes 
----- 
- 
  
 ====== Artists by Country ====== ====== Artists by Country ======
 ---- struct table ---- ---- struct table ----
 schema: wikidj_schema schema: wikidj_schema
-cols: page, country, state_or_town, status +cols: %pageid%, country, state_or_town, status, ownership_status
-sort: country +
-dynfilters: yes +
----- +
-final +
----- struct table ---- +
-schema: wikidj_schema +
-cols: page as "Artist" "{{include>system:link_helper?VAR=%page%}}", country, state_or_town, status+
 sort: country sort: country
 dynfilters: yes dynfilters: yes
 ---- ----
-pagelist 
-<pagelist& 
-  namespace=profile 
-  showheader 
-  showsort 
-  struct_cols="country, state_or_town, status" 
-> 
artists_by_country.1753975469.txt.gz · Last modified: by admin