optional setting to set pool order with the pool metatag
example: pool:10:3 (pool #10 with order 3)
This commit is contained in:
		
							parent
							
								
									77769d2c17
								
							
						
					
					
						commit
						df6b9245ec
					
				@ -325,7 +325,7 @@ class Pools extends Extension {
 | 
				
			|||||||
	public function onTagTermParse(TagTermParseEvent $event) {
 | 
						public function onTagTermParse(TagTermParseEvent $event) {
 | 
				
			||||||
		$matches = array();
 | 
							$matches = array();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if(preg_match("/^pool[=|:](.*)$/i", $event->term, $matches)) {
 | 
							if(preg_match("/^pool[=|:]([^:]*):?([0-9]*)$/i", $event->term, $matches)) {
 | 
				
			||||||
			global $user;
 | 
								global $user;
 | 
				
			||||||
			$poolTag = (string) str_replace("_", " ", $matches[1]);
 | 
								$poolTag = (string) str_replace("_", " ", $matches[1]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -337,7 +337,8 @@ class Pools extends Extension {
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			if($pool ? $this->have_permission($user, $pool) : FALSE){
 | 
								if($pool ? $this->have_permission($user, $pool) : FALSE){
 | 
				
			||||||
				$this->add_post($pool['id'], $event->id, true);
 | 
									$image_order = ($matches[2] ?: 0);
 | 
				
			||||||
 | 
									$this->add_post($pool['id'], $event->id, true, $image_order);
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user